diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2016-12-04 17:57:21 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2016-12-04 17:57:21 -0500 |
commit | ca8012cb56ae7456c8d3348e4c80c83072e303b9 (patch) | |
tree | be91c1e038f6c14b5442e6dbbb3c3e8aa690b6a6 /tests/test_process.py | |
parent | 45e9870ba232982e1e0d91ad56f41335c211a977 (diff) | |
download | python-coveragepy-git-ca8012cb56ae7456c8d3348e4c80c83072e303b9.tar.gz |
Need to clean up in the right order
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 aa536d08..141b253a 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): |