Skip to content

Commit b08b172

Browse files
committed
Remove file extension before converting to package path, to avoid inadertant castings like fixtures.pytest -> fixturestest
1 parent 425bcc6 commit b08b172

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
def _to_module_string(path: str) -> str:
2121
"""Convert a file path to a module string."""
22-
return path.replace("/", ".").replace("\\", ".").replace(".py", "")
22+
return path.replace(".py", "").replace("/", ".").replace("\\", ".")
2323

2424

2525
pytest_plugins = [

0 commit comments

Comments
 (0)