Honor the advertised debugger detection marker override - #206
Open
oyeong011 wants to merge 1 commit into
Open
Conversation
Confidence: high Scope-risk: narrow Tested: Regression fails before fix and passes after; full suite results recorded externally Not-tested: Other operating systems and Python versions
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.
Problem and change
pytest --markers advertises disable_debugger_detection on the timeout marker, and item-setting validation already supports it, but the parser rejects that keyword. Preserve the marker value and pass it through existing validation. The regression launches pytest subprocesses with both True and False and reads the resulting item settings; timeout=0 avoids timing-based assertions.
Verification
Original regression: 2 failed (exit 1), each child pytest exited with internal error for Invalid keyword argument. Fixed regression: 2 passed (exit 0), both children passed/exit 0. Full suite: 53 passed, 2 skipped, 6 xfailed (exit 0), 75 seconds. Ruff check/format and diff check pass.
Limits
Tested macOS Python 3.12.13 and pytest 9.1.1 only. Existing platform skips and expected failures remain.
AI assistance: OpenAI Codex drafted and checked this change; all reported commands were run locally.