fix: remove duplicate --use-latest pytest option in spin conftest#3205
Conversation
test/unit/conftest.py (added in Netflix#3040) already registers the --use-latest option for all unit tests. The duplicate registration in test/unit/spin/conftest.py (from Netflix#2506) causes a ValueError during test collection, preventing the entire unit test suite from running: ValueError: option names {'--use-latest'} already added Fix: remove the duplicate pytest_addoption from spin/conftest.py.
Greptile SummaryThis PR removes a duplicate
Confidence Score: 5/5The change is minimal and correct — removing a duplicate option registration that broke pytest collection with no effect on runtime test behavior. The deleted code is a duplicate of an already-present registration in the parent conftest. The --use-latest option continues to be registered once and consumed correctly in the spin fixtures. No logic or behavior changes; the only effect is fixing the collection crash. No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "style: fix black formatting in spin conf..." | Re-trigger Greptile |
|
Looks good to me. We can merge once the tests pass. |
Removing pytest_addoption left three blank lines before create_flow_fixture; black collapses that to two. Fixes the failing pre-commit check. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3205 +/- ##
=========================================
Coverage ? 28.31%
=========================================
Files ? 381
Lines ? 52353
Branches ? 9242
=========================================
Hits ? 14826
Misses ? 36587
Partials ? 940 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
Remove duplicate
--use-latestpytest option registration that prevents the unit test suite from collecting.Problem
Running
pytest test/unit/fails during collection with:--use-latestis registered in bothtest/unit/conftest.py(added in #3040) andtest/unit/spin/conftest.py(from #2506). pytest raises on the duplicate.Fix
Remove
pytest_addoptionfromtest/unit/spin/conftest.py. The roottest/unit/conftest.pyalready registers the option and it applies to all subdirectories.Testing
pytest test/unit/fails with collection error