Pytest Options
Pass these to pytest (or set in pytest.ini / pyproject.toml under addopts).
| Option | Description |
|---|---|
--dagz | Enable DAGZ test selection and coverage collection. |
--dagz-skip-redundant=0/1 | Skip tests proven redundant by code analysis against the baseline. Tristate; default is inferred from admin config. |
--dagz-workers N, -n N | Number of parallel worker processes; auto/logical = the default, calculated from your hardware. -n is pytest-xdist's flag: DAGZ reads it, xdist installed or not. --dist is accepted and ignored (DAGZ schedules tests itself). |
--dagz-cov=0/1 | Incremental line coverage (also --dagz-incremental-line-coverage). Tristate; default is inferred from project config. |
--dagz-cov-file PATH | Write a coverage report to PATH at the end of the run. Requires --dagz-cov-format. |
--dagz-cov-format FMT | pycoverage (.coverage SQLite, coverage.py-compatible) or xml (Cobertura). Requires --dagz-cov-file. |
--cov, --cov-report=xml[:PATH], --no-cov | pytest-cov's flags, honored with or without pytest-cov installed: --cov turns incremental line coverage on, --cov-report=xml[:PATH] writes Cobertura XML (default coverage.xml), --no-cov turns it off. --cov-config, --cov-branch, --cov-append, --no-cov-on-fail and other report types are accepted and ignored; --cov-fail-under fails the run (unsupported). |
--dagz-tiny-tests | Batch test results for projects with many short tests. |
--dagz-baseline REF | Use a specific baseline (jMMDD.N or a uuid). |
--dagz-no-baseline | Run without loading any baseline. |
--dagz-rerun-unhealthy JOBS | Rerun tests that weren't healthy in the given jobs. |
--dagz-capture=0/1 | Override default settings for capturing stdout+stderr. |
--dagz-offline | Run without contacting any DAGZ server. |
--dagz-debug | Run with full debug logs on the console. |
--dagz-debug-1 | Run with full debug logs and a single worker. |
--dagz-trace | Run in trace mode with maximum verbosity. |
--dagz-collect-log-level LEVEL | Lowest log level collected to the dagz server: trace, debug, info, notice, warn, error, fatal (any case) or a number. It overrides the project config's log_collect_level (default warn); without it, --dagz-trace collects trace and --dagz-debug collects debug. DAGZ_TRACE=1 and DAGZ_DEBUG=1 override it. dagz's own records are collected at any level. |
--dagz-web-tunnel | Tunnel worker traffic through the web port (TLS). Use when only the web port is reachable. |
--dagz-collect-fixup | Workaround for pytest #12083 (collection fails when mixing file paths and directories). |
--dagz-disable-sensors | Disable DAGZ instrumentation and integration hooks; run as plain pytest. Also --dagz-no-sensors. |
--dagz-allow-any-os | Bypass the Linux-only platform check. Unsupported, may not work correctly. |