Repository navigation
fix(main): preserve parametrization in collection not found error diagnostic - #15423
Closed
abhishekrajv7-cmd wants to merge 1 commit into
Closed
abhishekrajv7-cmd wants to merge 1 commit into
abhishekrajv7-cmd wants to merge 1 commit into
Conversation
…gnostic When selecting a non-existent parametrized test ID (such as est_x.py::test_x[missing]), the collection not found diagnostic omitted the parametrization suffix from the reported argument, misleadingly reporting that the base test was not found. Append the parametrization to report_arg in Session.perform_collect when present.
Member
|
🤖 Written by Claude Opus 5.5 via Claude Code for the pytest maintainers; I prompted it, it did the work, I read it. Closing as an AI drive-by. The source change is the fix suggested in #15422, copied line for line. This PR was opened 16 minutes after a different account filed that issue, with no word on the issue, no AI disclosure, and as one of 7 PRs to 6 unrelated projects today. Nothing here shows a person picked the issue or will engage with review. Our AI policy: https://github.com/pytest-dev/pytest/blob/main/CONTRIBUTING.rst. If you want to work on an issue, comment on it first in your own words and say what you understand and plan to do. Generated by Claude Code |
This was referenced Nov 21, 2026
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.
closes #15422
Description
When selecting a non-existent parametrized test ID on the command line (for example
pytest "test_x.py::test_x[missing]"), theERROR: not found:collection diagnostic omitted the requested[missing]parametrization and reported onlytest_x.py::test_x.This is misleading because
test_xdoes exist, while only the requested parameter variant does not.This PR appends
parametrization(when present) toreport_arginSession.perform_collectbefore recording toself._notfound.Verification
test_not_found_with_parametrizationintesting/acceptance_test.py.pytest testing/test_main.py,pytest testing/acceptance_test.py).ruff.changelog/15422.bugfix.rst.AUTHORS.