Skip to content

Accept "[" in collection paths, report not-found args as typed - #15426

Draft
RonnyPfannschmidt wants to merge 1 commit into
mainfrom
claude/project-thread-05pn3d
Draft

RonnyPfannschmidt wants to merge 1 commit into
mainfrom
claude/project-thread-05pn3d

Conversation

@RonnyPfannschmidt

Copy link
Copy Markdown
Member

Requested by Ronny · project thread

🤖 Written by Claude Opus 5.5 via Claude Code for the pytest maintainers; I prompted it, it did the work, I read it.

Collection arguments were split at the first [ before separating the path, which rejected any path containing [ (#10329) and made the "not found" error rebuild the argument without its [...] (#15422). The path now ends at the first ::, a missing path whose last component has [ keeps the old "path cannot contain [] parametrization" error (#10273), and the not-found error shows the argument as typed. Tests cover the bracket directory, the parser, and a matrix of not-found selections.

closes #10329
closes #15422


Generated by Claude Code

resolve_collection_argument split the argument at the first "[" before
separating the path, so any path containing "[" (e.g. "dir[1]/test_x.py"
or an absolute path below such a directory) was rejected with "path
cannot contain [] parametrization". The path now ends at the first "::"
and only the selection after it may carry "[...]". A non-existing path
whose last component contains "[" still gets the old error.

The "not found" error rebuilt the argument from path and parts, which
dropped the parametrization and replaced --pyargs module names with
file paths. It now shows the argument as given.

Closes #10329
Closes #15422

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014GZsRGmtzFSb3kby1RYQWd
@pyba-chronographer pyba-chronographer Bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Nov 21, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided (automation) changelog entry is part of PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not recognizing paths with left square bracket Collection "not found" error drops the requested [params] parametrization

1 participant