--- id: pytest-odoo version: "2.2.0" license: AGPLv3 license_treatment: agpl maintenance: active --- # pytest-odoo — py.test plugin to run Odoo tests License: agpl · Maintenance: active · Downloads: 90.8K/mo ## 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 above — 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 pip install pytest-odoo uv add pytest-odoo poetry add pytest-odoo ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 90.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags pytest plugin for odoo, odoo test runner, odoo addon testing, pytest odoo integration, odoo unittest with pytest, odoo tdd development, odoo test framework, odoo-development, pytest-plugin, tdd-acceleration [View on SkillFed](https://skillfed.io/packages/pytest-odoo) · [View on PyPI](https://pypi.org/project/pytest-odoo/)