summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2016-12-04 17:57:21 -0500
committerNed Batchelder <ned@nedbatchelder.com>2016-12-04 17:57:21 -0500
commit7c61630cc8217c848401b68d19982ea34fc7efd9 (patch)
treed88ac14258305baa72ff5575dea4bb088a2bdb9c
parent01b3ccc3857eedbb05c27b45995800e25d46997e (diff)
downloadpython-coveragepy-7c61630cc8217c848401b68d19982ea34fc7efd9.tar.gz
Need to clean up in the right order
-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 aa536d0..141b253 100644
--- a/tests/test_process.py
+++ b/tests/test_process.py
@@ -1103,6 +1103,8 @@ class ProcessCoverageMixin(object):
def setUp(self):
super(ProcessCoverageMixin, self).setUp()
pth_lock.acquire()
+ self.addCleanup(pth_lock.release)
+
# Find a place to put a .pth file.
pth_contents = "import coverage; coverage.process_startup()\n"
pth_path = os.path.join(pth_dir, "subcover.pth")
@@ -1111,7 +1113,6 @@ class ProcessCoverageMixin(object):
self.pth_path = pth_path
self.addCleanup(os.remove, self.pth_path)
- self.addCleanup(pth_lock.release)
class ProcessStartupTest(ProcessCoverageMixin, CoverageTest):