Skip to content
Latchkey

coverage "--parallel-mode" Produces No Combined Data in CI

In --parallel-mode, coverage.py writes a separate .coverage.<host>.<pid> file per process and never merges them automatically. Skipping coverage combine leaves the report with no aggregated data - it shows 0% or "No data."

What this error means

A parallel/multiprocess test run reports No data to report or an implausibly low total, despite tests running. The .coverage.* data files exist on disk but were never combined into a single .coverage.

Terminal
$ coverage report
No data to report.
$ ls -a
.coverage.runner.1234  .coverage.runner.1255  .coverage.runner.1290

Common causes

combine step omitted

--parallel-mode (used with subprocesses or xdist) writes suffixed data files. Without coverage combine, coverage report finds no single .coverage to read.

Data files scattered across directories

When workers run in different cwds or containers, the .coverage.* files are not all in one place for combine to find.

How to fix it

Combine before reporting

Terminal
coverage combine
coverage report -m
coverage xml   # for CI upload

Enable parallel mode and a single data dir

Configure parallel mode and a stable data file location so combine finds every shard.

pyproject.toml
[tool.coverage.run]
parallel = true
data_file = ".coverage"
concurrency = ["multiprocessing"]

How to prevent it

  • Always coverage combine before reporting in parallel mode.
  • Pin a single data_file location so shards are found.
  • Gather worker data files to one directory before combining in distributed runs.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →