Skip to content

Commit 1661509

Browse files
rnixxclaude
andcommitted
Add pytest configuration for namespace packages
Configure pytest to properly handle implicit namespace packages by: - Enabling consider_namespace_packages option - Using importlib import mode - Setting pythonpath to src directory This fixes module naming in test reports, ensuring tests are reported with their full namespace path (e.g., node.tests.Foo instead of tests.Foo). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent d5ac268 commit 1661509

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,11 @@ Homepage = "http://github.com/conestack/node.ext.fs"
3737

3838
[tool.hatch.build.targets.wheel]
3939
packages = ["src/node"]
40+
41+
[tool.pytest.ini_options]
42+
consider_namespace_packages = true
43+
addopts = ["--import-mode=importlib"]
44+
pythonpath = "src"
45+
4046
[tool.zest-releaser]
4147
create-wheel = true

0 commit comments

Comments
 (0)