summaryrefslogtreecommitdiff
path: root/tests/test_process.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-02-09 10:55:46 -0500
committerNed Batchelder <ned@nedbatchelder.com>2015-02-09 10:55:46 -0500
commit29e89f42905d3867932261ccf2b2ac040784b94e (patch)
treed4128b194594d990ae50c5211908eaa8985b3c37 /tests/test_process.py
parentfcb86086705f885480e89f9b28b0dc6ee58d6657 (diff)
downloadpython-coveragepy-29e89f42905d3867932261ccf2b2ac040784b94e.tar.gz
Remove (most) tearDown functions in favor of addCleanup
Diffstat (limited to 'tests/test_process.py')
-rw-r--r--tests/test_process.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_process.py b/tests/test_process.py
index 5ab6ba6..4f61274 100644
--- a/tests/test_process.py
+++ b/tests/test_process.py
@@ -738,8 +738,9 @@ class ProcessCoverageMixin(object):
else: # pragma: not covered
raise Exception("Couldn't find a place for the .pth file")
- def tearDown(self):
- super(ProcessCoverageMixin, self).tearDown()
+ self.addCleanup(self.remove_pth_path)
+
+ def remove_pth_path(self):
# Clean up the .pth file we made.
os.remove(self.pth_path)