[None][fix] test_cbts_coverage_pilot: use capfd to avoid autouse-fixture clash - #18076
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. WalkthroughThe coverage pilot test now uses pytest’s ChangesCoverage test update
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This is a localized test-only fixture update, and no actionable merge-blocking risk remains beyond normal validation. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/bot run --disable-fail-fast |
|
PR_Github #68352 [ run ] triggered by Bot. Commit: |
…ure clash tests/unittest/conftest.py has an autouse fixture cuda_error_early_quit(capfd), so any test under tests/unittest requesting capsys errors on setup with 'cannot use capsys and capfd at the same time'. Switch test_main_reads_bot_trigger_payload to capfd (fd-level capture is a superset and readouterr() is API-identical). Signed-off-by: Chang Liu <liuc@nvidia.com>
7220e0a to
460d3a1
Compare
|
/bot run |
|
PR_Github #68359 [ run ] triggered by Bot. Commit: |
|
PR_Github #68352 [ run ] completed with state
|
|
FYI, there is a waiver for the issue now, so maybe it's a good idea to unwaive it with this PR. The bug is 6647594 |
The waiver (https://nvbugs/6647594, added in NVIDIA#18080) is no longer needed: the capsys/capfd autouse-fixture clash is fixed in this PR by switching the test to capfd. Remove the SKIP entry so the test runs again. Signed-off-by: Chang Liu <liuc@nvidia.com>
|
Done — updated the branch past #18080 and removed the waiver line in this PR ( |
|
/bot run |
|
PR_Github #68362 [ run ] triggered by Bot. Commit: |
|
PR_Github #68359 [ run ] completed with state |
|
PR_Github #68362 [ run ] completed with state |
Description
tests/unittest/scripts/test_cbts_coverage_pilot.py::test_main_reads_bot_trigger_payload(added in #17996) fails deterministically on setup in every L0unittest/scriptsshard:Root cause:
tests/unittest/conftest.pydefines the autouse fixturecuda_error_early_quit(capfd), so every test undertests/unittestalready holdscapfd; a test requestingcapsysis therefore rejected by pytest at setup.Fix: switch the test to
capfd(fd-level capture is a superset ofcapsys;readouterr()is API-identical). Two-line change.Evidence: L0_MergeRequest_PR builds 55686 and 55711 on PR #17693 (A10-PyTorch-3,
unittest/scriptsshard). Also reported on #17996.Test Coverage
The fixed test itself:
tests/unittest/scripts/test_cbts_coverage_pilot.py.PR Checklist
🤖 Generated with Claude Code
Dev Engineer Review
capsyswithcapfdintest_main_reads_bot_trigger_payload.cuda_error_early_quit(capfd)fixture.tests/integration/test_lists/waives.txt.QA Engineer Review
test_main_reads_bot_trigger_payload.tests/integration/test_lists/waives.txt.