diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2016-11-26 15:59:46 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2016-11-26 15:59:46 -0500 |
commit | b17a7a8c1e686e8cf671e70e5023884c40faf633 (patch) | |
tree | 0870d58cccda45f594b65308b776dbba809e1073 /tests/test_process.py | |
parent | 10a2e79516ae41ec111dc15966feedd82cd67861 (diff) | |
download | python-coveragepy-b17a7a8c1e686e8cf671e70e5023884c40faf633.tar.gz |
Fix two problems with xdist'ed tests
Diffstat (limited to 'tests/test_process.py')
-rw-r--r-- | tests/test_process.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_process.py b/tests/test_process.py index 02e23e7..75d420a 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) |