Skip to content

Fix collection of Python test files containing square brackets - #15218

Closed
hemanshu406 wants to merge 2 commits into
pytest-dev:mainfrom
hemanshu406:test/config-toml-bool-vs-int
Closed

hemanshu406 wants to merge 2 commits into
pytest-dev:mainfrom
hemanshu406:test/config-toml-bool-vs-int

Conversation

@hemanshu406

Copy link
Copy Markdown

Summary

  • Fixed test collection for Python filenames containing square brackets.
  • Improved path parsing to distinguish literal filenames from test-selection syntax.
  • Added a regression test covering test_[helper].py.

Testing

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

Checklist

  • Added regression test coverage.
  • Verified relevant tests pass.
  • Added changelog fragment 15217.bugfix.rst.
  • Added contributor information to AUTHORS.
  • Credited AI assistance using Co-authored-by commit trailers.

AI Assistance

GitHub Copilot assisted with implementation and testing. The contribution is subject to human review and ownership.

Changelog

Fixed test collection for Python files whose names contain square brackets.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants