pytest-odoo
py.test plugin to run Odoo tests
What it is and what it does
pytest-odoo bridges Odoo's unittest-based addon tests with pytest, letting developers run tests via pytest's CLI and ecosystem instead of Odoo's slower upgrade-based test runner. It's designed as a development-time tool for faster TDD iteration: you upgrade your addon once, then run tests repeatedly without re-upgrading. The plugin supports pytest-xdist for parallel test execution (creating isolated database copies per worker) and pytest-subtests for granular failure reporting.
The package requires Python 3.8 or later and depends only on pytest. It accepts Odoo configuration via command-line flags (--odoo-database, --odoo-log-level, --odoo-config, --odoo-http, --odoo-skip-at-install) or environment variables (HOST, PORT, USER, PASSWORD, ODOO_RC). The documentation notes that pytest-odoo treats all tests as post-install by default and should complement, not replace, Odoo's native --test-enable in CI pipelines.
Use it for:
- Rapid test-driven development of Odoo addons without waiting for full module upgrades on each test run
- Running Odoo addon tests in parallel across multiple workers using pytest-xdist for faster feedback
- Integrating Odoo addon tests into a pytest-based CI/CD pipeline alongside other Python tests
- Debugging individual addon tests with pytest's verbose output and filtering capabilities
- Skipping at-install tests during development to focus on post-install test scenarios
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
pytest-odoo is a pytest plugin that runs Odoo addon tests using pytest's CLI instead of Odoo's built-in test runner, enabling faster iteration during development.
Yes, if you develop Odoo addons and want faster test iteration during development. Install it as a dev dependency alongside pytest. Be aware of the AGPLv3 license if your project has commercial distribution requirements, and remember that pytest-odoo is a development accelerator, not a replacement for Odoo's native test runner in CI—use both for complete coverage.
Install
pytest-odoo on PyPI
pip
pip install pytest-odoouv
uv add pytest-odoopoetry
poetry add pytest-odooInstalling pytest-odoo
Before you install
Low friction install with a single runtime dependency (pytest). The package is actively maintained with a recent release 43 days ago and has been stable since its 2016 initial release.
License in practice
Licensed under AGPLv3, which requires that any derivative works or distributions must also be open-source under the same license. This is a strong copyleft requirement suitable for internal tools and open-source projects but may restrict commercial closed-source use.
Quickstart
pip install pytest-odoo
pytest -s --odoo-database=test --odoo-log-level=debug_sql
Requires a running Odoo instance and database; system dependencies (libxml2-dev, libxslt1-dev, libpq-dev, etc.) needed for integration testing on Debian/Ubuntu.
Verify before relying
- Compatibility with specific Odoo versions (ERP framework versions supported by pytest-odoo 2.2.0)
- Performance characteristics when running large test suites compared to Odoo's native --test-enable
- Whether pytest-xdist distributed testing works reliably with all Odoo addon patterns
Package facts
| License | AGPLv3 (agpl) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — pytest |
| Maintenance | actively maintained — 43 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 90,829/month — #13,561 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pytest_odoo-2.2.0-py3-none-any.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
odoo-test-helperProvides utilities for writing Odoo tests,…
copyleft · top 15,000 on PyPI
manifestoo-coreParses and reasons about Odoo addon manifests,…
permissive · top 15,000 on PyPI
pytest-parallelA pytest plugin that runs tests in parallel…
permissive · top 15,000 on PyPI
setuptools-odooSetuptools-odoo automates packaging of Odoo…
copyleft · top 15,000 on PyPI
pylint-odooA Pylint plugin that adds Odoo-specific code…
agpl · top 15,000 on PyPI
pytest-cppA pytest plugin that discovers and runs C++…
permissive · top 15,000 on PyPI
tdd-guard-pytestA pytest plugin that captures test results and…
permissive · top 15,000 on PyPI
pytest-incrementalpytest-incremental is a pytest plugin that…
permissive · top 15,000 on PyPI
pytest-subtestsAdds subTest() support to pytest, allowing…
permissive · top 5,000 on PyPI
pytest-djangopytest-django integrates Django with pytest,…
permissive · top 1,000 on PyPI