Skip to content

feat: add python_dotted_filenames ini option#14515

Open
NIK-TIGER-BILL wants to merge 2 commits into
pytest-dev:mainfrom
NIK-TIGER-BILL:fix-dotted-filenames
Open

feat: add python_dotted_filenames ini option#14515
NIK-TIGER-BILL wants to merge 2 commits into
pytest-dev:mainfrom
NIK-TIGER-BILL:fix-dotted-filenames

Conversation

@NIK-TIGER-BILL
Copy link
Copy Markdown

This PR adds an opt-in ini option python_dotted_filenames that replaces dots in test file names with underscores when computing module names. This allows pytest to collect tests from files like test.foo.py.

Closes #14514

  • Include documentation when adding new features.
  • Include new tests or update existing tests when applicable.
  • Allow maintainers to push and squash when merging my commits.
  • Add text like closes #14514 to the PR description and/or commits.
  • Create a new changelog file in the changelog directory.
  • Add yourself to AUTHORS in alphabetical order.

…filenames with underscores

This adds an opt-in ini option python_dotted_filenames that replaces
dots in test file names with underscores when computing module names.
This allows pytest to collect tests from files like test.foo.py.

Closes pytest-dev/pytest pytest-dev#14514

Signed-off-by: NIK-TIGER-BILL <nik.tiger.bill@github.com>
@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided (automation) changelog entry is part of PR label May 24, 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.

Allow dotted test filenames (*.test.py) via one-line change to compute_module_name

1 participant