Skip to main content

test

Run tests using ChimeraX's Python environment with pytest.

Usage

echi test [OPTIONS] [PATH] [-- <PYTEST_ARGS>...]

Arguments

ArgumentDefaultDescription
PATH.Project directory
PYTEST_ARGSAdditional arguments passed to pytest (after --)

Options

OptionDescription
-k, --filter <EXPR>Only run tests matching the given expression
--pytest-verboseIncrease pytest verbosity (adds -v flag)
--no-buildSkip build step
--no-installSkip install step
--coverageGenerate coverage report
--smokeRun smoke test (scripts/smoke.cxc) instead of pytest
--allTest all bundles in workspace

Examples

# Run all tests in tests/
echi test

# Filter tests by expression
echi test -k test_foo

# Increase pytest verbosity
echi test --pytest-verbose

# Skip build and install steps
echi test --no-build --no-install

# Run smoke test
echi test --smoke

# Pass additional pytest args
echi test -- --cov=src

Prerequisites

pytest must be installed in ChimeraX's Python environment:

echi packages install pytest