summaryrefslogtreecommitdiff
path: root/tests/test_process.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2016-11-26 15:59:46 -0500
committerNed Batchelder <ned@nedbatchelder.com>2016-11-26 15:59:46 -0500
commit40d47b5581ca59befd89df494b24ec7ef85ac70c (patch)
tree9fd8b0b36786d965a8e6be89b0502c1fe0956da6 /tests/test_process.py
parent1e10d4d053568cfeb102fb0c72496a978d08cae0 (diff)
downloadpython-coveragepy-git-40d47b5581ca59befd89df494b24ec7ef85ac70c.tar.gz
Fix two problems with xdist'ed tests
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)