Skip to content

Allow dotted test filenames (*.test.py) via dot-escape in compute_module_name#14750

Open
Abhi-DevHub wants to merge 4 commits into
pytest-dev:mainfrom
Abhi-DevHub:fix/dotted-test-filename
Open

Allow dotted test filenames (*.test.py) via dot-escape in compute_module_name#14750
Abhi-DevHub wants to merge 4 commits into
pytest-dev:mainfrom
Abhi-DevHub:fix/dotted-test-filename

Conversation

@Abhi-DevHub

Copy link
Copy Markdown

Escape dots inside path parts in compute_module_name, the same way module_name_from_path already does. This maps pkg/foo.test.py to module pkg.foo_test instead of the invalid pkg.foo.test.

The change is one line — the same p.replace(., _) pattern already used by the sibling module_name_from_path fallback.

closes: #14514

@Abhi-DevHub
Abhi-DevHub force-pushed the fix/dotted-test-filename branch from db6e9f0 to ce1d906 Compare July 21, 2026 18:05
@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Jul 21, 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