- Always run tox from the main
tox.venv - If there is no
tox.venv, create one withpython -m venv tox.venv, activate it and runpip install tox
Use tox for testing (not pytest directly):
- Test matrix configuration is in
tox.ini - Integration tests:
tox -e py3.14-{integration}-v{version} - Common tests:
tox -e py3.14-common
Use tox for type checking (not mypy directly):
- Run
tox -e mypybefore committing (must pass with zero errors) - Strict mode enabled (
check_untyped_defs,disallow_untyped_defs)
Use tox for linting (not ruff directly):
tox -e ruff- Full lint suite:
tox -e linters - Full lint suite must pass before committing
AI commits MUST include:
Co-Authored-By: <agent model name> <noreply@anthropic.com>
Example: Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Do NOT edit these directly — modify source scripts instead:
tox.ini— generated byscripts/populate_tox/populate_tox.pyfromscripts/populate_tox/tox.jinja.github/workflows/test-integrations-*.yml— generated byscripts/split_tox_gh_actions/split_tox_gh_actions.py- Regenerate all:
scripts/generate-test-files.sh
- Add minimum version to
_MIN_VERSIONSinsentry_sdk/integrations/__init__.py - Add config to
TEST_SUITE_CONFIGinscripts/populate_tox/config.py - Add to group in
scripts/split_tox_gh_actions/split_tox_gh_actions.py - Run
scripts/generate-test-files.sh
- Don't crash applications or swallow exceptions
- Don't mutate object references or alter function signatures
- Don't leak file descriptors or make unexpected DB requests
- Write defensive code
- Use end-to-end tests (not mocks)
| Path | Description |
|---|---|
sentry_sdk/integrations/ |
integration modules |
sentry_sdk/ai/ |
AI monitoring |
sentry_sdk/crons/ |
Cron monitoring |
sentry_sdk/profiler/ |
Performance profiling |
tests/integrations/{name}/ |
Integration test suites |
scripts/populate_tox/config.py |
Test suite configuration |