From Dev.to
pytest-xdist Tests Pass Serially but Fail in Parallel: One Postgres Database per Worker
If your suite is green with pytest and flaky with pytest -n auto, the workers are almost certainly sharing one database and stepping on each other's rows. The durable fix is to give each xdist worker...
