Skip to content

Handle brackets in collection file paths - #15217

Closed
hemanshu406 wants to merge 2 commits into
pytest-dev:mainfrom
hemanshu406:fix/collection-literal-bracket-paths
Closed

hemanshu406 wants to merge 2 commits into
pytest-dev:mainfrom
hemanshu406:fix/collection-literal-bracket-paths

Conversation

@hemanshu406

Copy link
Copy Markdown
  • Improved test collection to correctly handle existing Python file paths containing square brackets.
  • Updated collection path parsing to distinguish literal filenames from test-selection syntax.
  • Added a regression test covering a file named test_[helper].py.

Testing

  • python -m pytest testing/test_main.py -q
  • 25 passed

Checklist

  • Added regression test coverage.
  • Verified the relevant tests pass.
  • Added the required changelog fragment.
  • Updated AUTHORS if required.
  • Verified AI assistance is credited in commit trailers.

AI Assistance

AI tools assisted with implementation and testing. The contributor is responsible for reviewing and maintaining the changes.

Himanshu and others added 2 commits October 19, 2026 14:36
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pyba-chronographer pyba-chronographer Bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Oct 19, 2026
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.

2 participants