fix: remove duplicate --use-latest pytest option in spin conftest#3205
Open
odncode wants to merge 1 commit into
Open
fix: remove duplicate --use-latest pytest option in spin conftest#3205odncode wants to merge 1 commit into
odncode wants to merge 1 commit into
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.
Contributor
Greptile SummaryRemoves a duplicate
Confidence Score: 5/5Safe to merge — removes a single duplicate option registration that was breaking test collection; no logic changes. The change is a one-hunk deletion of eight lines. The root conftest already owns the --use-latest registration, and the spin fixtures continue to consume it via request.config.getoption without any modification. No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "fix: remove duplicate --use-latest pytes..." | Re-trigger Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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