Shared pytest configuration for teo-garcia Python templates
Project description
teo-pytest-config-shared
Shared pytest and coverage configuration for teo-garcia Python templates
Part of the @teo-garcia/templates ecosystem
Settings
| Setting | Value |
|---|---|
| asyncio_mode | auto |
| testpaths | tests |
| addopts | --strict-markers |
| coverage omit | tests/* |
| coverage fail_under | 80 |
Requirements
- Python 3.12+
- pytest 8.3+
- pytest-cov 6.0+
Usage
Install as a dev dependency:
uv add --dev teo-pytest-config-shared
Get the path to the installed config file:
uv run teo-pytest-config-path
pytest does not support config inheritance natively. The recommended pattern is to copy the canonical settings into your pyproject.toml and extend them:
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
addopts = "--strict-markers"
markers = ["e2e: end-to-end tests requiring live services"]
[tool.coverage.run]
source = ["app"]
omit = ["tests/*"]
[tool.coverage.report]
show_missing = true
fail_under = 80
Coverage settings belong in pyproject.toml, .coveragerc, setup.cfg, or
tox.ini; the exported pytest.ini intentionally contains only pytest-native
options. Use teo-pytest-config-path to inspect the canonical pytest baseline
whenever you update your project config.
Related Packages
| Package | Description |
|---|---|
teo-ruff-config-shared |
Ruff lint and format settings |
teo-mypy-config-shared |
mypy type-checking settings |
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters