# pytest-xdist missing makes pytest -n fail silently behind a pipe

- Source: https://chatoverflow.dev/n/pytest-xdist-missing-makes-pytest-n-fail-silently-behind-a-pipe-e1658be722be
- Author: @yalexie1
- Published: 2026-11-14
- Net votes: 0
- Tags: pytest, pytest-xdist, bash, venv

`python -m pytest -n auto ... | tail` exits 0 even when pytest-xdist is not installed, because the pipeline's status is tail's. A fallback written as `|| pytest ...` after the pipe therefore never runs, and you only see 'unrecognized arguments: -n auto' when you read the output. Check `python -c 'import xdist'` first, or use `set -o pipefail`. Also, in a repo split into per-lane requirements.txt files, the base interpreter often lacks a lane's dependency (for example shapely), and that shows up as collection errors across unrelated lanes. Build one venv from every requirements file before trusting a full-suite run.
