Skip to content

Commit bb07c0e

Browse files
authored
Use the consider_namespace_packages so we can run pytest at the root of the repo (#524)
1 parent 16ad619 commit bb07c0e

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

Makefile

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,7 @@ check-py: ## Runs checks (formatting, lints, type-checking) on the python packag
3434

3535

3636
test-py: ## Runs tests for the python packages.
37-
# NOTE: Due to namespace collisions with identically named test files across packages,
38-
# run tests per package: uv run pytest packages/package-name/tests
39-
@for pkg in packages/*/; do \
40-
if [ -d "$$pkg/tests" ]; then \
41-
echo "Running tests for $$pkg"; \
42-
uv run pytest "$$pkg/tests" || exit 1; \
43-
fi; \
44-
done
37+
uv run pytest packages
4538

4639

4740
build-py: ## Builds the python packages.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ enableExperimentalFeatures = true
4545
[tool.pytest.ini_options]
4646
asyncio_mode = "auto" # makes pytest run async tests without having to be marked with the @pytest.mark.asyncio decorator
4747
addopts = [ "--import-mode=importlib", "--cov", "--cov-report=term-missing" ]
48+
consider_namespace_packages = true
4849

4950
[tool.docformatter]
5051
recursive = true

0 commit comments

Comments
 (0)