with one click
running-tests
// Use when running pytest, checking test results, or understanding test infrastructure in aiida-core.
// Use when running pytest, checking test results, or understanding test infrastructure in aiida-core.
Use when adding a new `verdi` subcommand in `src/aiida/cmdline/`.
Use when adding a new third-party dependency to aiida-core's `pyproject.toml`.
Use when exploring the aiida-core codebase structure, looking for key files, or understanding how packages relate to each other.
Use when making commits, creating branches, or preparing pull requests for aiida-core.
Use when diagnosing failed, stuck, or misbehaving AiiDA processes or the daemon.
Use when deprecating a public Python API or `verdi` CLI command in aiida-core.
| name | running-tests |
| description | Use when running pytest, checking test results, or understanding test infrastructure in aiida-core. |
Always invoke via uv run so tests pick up the locked project environment.
Never use bare python or pytest.
uv sync # install from uv.lock
uv run pytest # full suite (requires PostgreSQL + RabbitMQ)
uv run pytest -m presto # quick subset (SqliteTempBackend, no services)
uv run pytest tests/orm/test_nodes.py # specific module
uv run pytest tests/orm/test_nodes.py::TestNode # specific class
uv run pytest tests/orm/test_nodes.py::TestNode::test_store # specific method
uv run pytest -n auto # parallel
uv run pytest -x --ff # stop on first failure, failed first on rerun
uv run pytest --no-instafail # disable instant failure output (enabled by default via addopts)
uv run pytest --cov aiida # run with coverage
The project uses several pytest plugins (configured in pyproject.toml under [tool.pytest.ini_options]):
pytest-instafail (show failures instantly, enabled by default), pytest-xdist (parallel via -n), pytest-cov, pytest-timeout, pytest-rerunfailures, pytest-benchmark (skipped by default), pytest-regressions.
Default addopts: --instafail --tb=short --strict-config --strict-markers -ra --benchmark-skip --durations=5.
presto-marked tests use an in-memory SqliteTempBackend. If they fail, the bug is in the code, not in service configuration.pytest-timeout). Override per-test with @pytest.mark.timeout(seconds) if needed.tests/conftest.py and per-subtree conftest.py files, check there before writing ad-hoc setup.writing-tests skill for test philosophy, marker conventions, and parametrization patterns.verdi devel launch-add # launch test ArithmeticAddCalculation
verdi devel launch-multiply-add # launch test MultiplyAddWorkChain