Reusable testing infrastructure
testkit/ is the authoritative source for reusable testing, formatting,
pre-commit, workflow, fixture, and scaffold assets used by Odoo addon
repositories. It is infrastructure for other repositories; _pmiconfig's own
tests remain under ../tests/.
Repository-controlled consumers resolve this tree through
/srv/pmiverse/_pmiconfig/testkit/. Generated downstream .testing/
directories remain deployment or scaffold outputs and are not authoritative
source. The former source directory is intentionally not retained as a
duplicate, wrapper, or symlink.
Contents
pytest/contains the runner plugin, base configuration, coverage settings, fixtures, and addon test templates.formatting/contains the sole canonical Ruff formatting and import-order policy.linting/contains the pylint-odoo configuration.pre-commit/andworkflows/contain reusable automation templates.requirements-dev.txtrecords development-tool dependencies.changelog/records historical iterations of this testing infrastructure. It is archival evidence, not current navigation or a runbook; some recorded plans, policy locations, instance paths, and commands no longer exist or no longer represent current practice. Its historical content moved with the tree and must not be rewritten to look current.
Tests that verify _pmiconfig live in ../tests/.
Executable runners, policy synchronization, and scaffold/publishing commands live in
../scripts/test/, with detailed reference pages in the
documentation portal.
Most files here are source-controlled templates or shared configuration. Pytest and Ruff cache directories are generated local state and are ignored; they should not be committed. Test reports and badges are written to the paths documented by the runners, normally outside this repository.
Use sync_ruff_policy.py to check or
apply the canonical Ruff tables in direct downstream Git repositories. The
non-writing check compares Ruff policy semantically and reports active nested
Ruff or standalone isort conflicts.
Use ruff_format_repo.py with a repository
path to check imports and formatting, or add --fix to apply changes. Fix mode
prints a sorted list of absolute paths whose contents changed during the run,
including import-only fixes. Unchanged files are omitted, and changes made before
a Ruff failure are still listed. --paths, --exclude, and --extend-exclude
limit the selected files as usual.
ruff_format_module.py provides the same
changed-file report with --fix for a module path or a module name selected with
--addons-root. Its --exclude option limits the selected files.
The Odoo runners can create, initialize, and drop disposable PostgreSQL
databases. Follow canonical PMIVerse testing policy, use focused addon
selection, and preserve the documented test_ naming safety boundary. Do not
invoke a workflow template as though it were a local runner.
See pytest/README.md for implementation-specific fixture
guidance and the detailed runner pages for verified entry points.