Skip to content

Fix only_rerun marker precedence test - #348

Merged
icemac merged 1 commit into
pytest-dev:masterfrom
janmrow:fix-only-rerun-marker-cli-test
Aug 20, 2026
Merged

Fix only_rerun marker precedence test#348
icemac merged 1 commit into
pytest-dev:masterfrom
janmrow:fix-only-rerun-marker-cli-test

Conversation

@janmrow

@janmrow janmrow commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

test_only_rerun_flag_in_flaky_marker builds CLI arguments but doesn't pass them to runpytest(). This means its marker-vs-CLI cases never exercise the CLI option.

Pass the arguments to runpytest() so the test verifies that marker-level only_rerun takes precedence over the CLI value.

To confirm the gap, I temporarily reversed the precedence. The original test still passed, while the corrected test failed as expected.

@janmrow

janmrow commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

This is a test-only one-line fix, so I left out a changelog entry in line with the “unless the change is trivial” guidance in CONTRIBUTING.rst. I’m happy to add a changes/348.misc.rst entry if preferred.

@icemac icemac added the no-changelog Skip the change log entry check for this pull request label Aug 20, 2026
@icemac
icemac merged commit 0b0843a into pytest-dev:master Aug 20, 2026
43 of 44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Skip the change log entry check for this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants