summaryrefslogtreecommitdiff
path: root/tests/test_process.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_process.py')
-rw-r--r--tests/test_process.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_process.py b/tests/test_process.py
index 02e23e72..75d420a0 100644
--- a/tests/test_process.py
+++ b/tests/test_process.py
@@ -1087,7 +1087,8 @@ class ProcessCoverageMixin(object):
# Find a place to put a .pth file.
pth_contents = "import coverage; coverage.process_startup()\n"
for pth_dir in possible_pth_dirs(): # pragma: part covered
- pth_path = os.path.join(pth_dir, "subcover.pth")
+ worker = os.environ.get('PYTEST_XDIST_WORKER', '')
+ pth_path = os.path.join(pth_dir, "subcover_{0}.pth".format(worker))
with open(pth_path, "w") as pth:
try:
pth.write(pth_contents)