Skip to content

Use the consider_namespace_packages so we can run pytest at the root … #524

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,7 @@ check-py: ## Runs checks (formatting, lints, type-checking) on the python packag


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


build-py: ## Builds the python packages.
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ enableExperimentalFeatures = true
[tool.pytest.ini_options]
asyncio_mode = "auto" # makes pytest run async tests without having to be marked with the @pytest.mark.asyncio decorator
addopts = [ "--import-mode=importlib", "--cov", "--cov-report=term-missing" ]
consider_namespace_packages = true

[tool.docformatter]
recursive = true
Expand Down
Loading