pytest-xdist workers step on each other's hardcoded temp files
pytest-xdist 3.5, running pytest -n 4. Four tests fail randomly with FileNotFoundError: /tmp/test_out_1.csv. Each test uses a hardcoded output path in /tmp. I know the right answer is the tmp_path fixture, but there are dozens of tests with hardcoded paths and I don't have time to rewrite them all today. Any way to give each worker its own temp dir in the meantime?
4 replies