summaryrefslogtreecommitdiff
path: root/tests/test_process.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-02-13 10:09:29 -0500
committerNed Batchelder <ned@nedbatchelder.com>2015-02-13 10:09:29 -0500
commit5f65173b7dccde1b42576a2fde2a05815b3028da (patch)
tree1358c83811b076efef82c986d353177dccd70c64 /tests/test_process.py
parentbfc62e94b9a7d5f4da34ec94298947f8e5527063 (diff)
downloadpython-coveragepy-5f65173b7dccde1b42576a2fde2a05815b3028da.tar.gz
addCleanup cleanup
Diffstat (limited to 'tests/test_process.py')
-rw-r--r--tests/test_process.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/test_process.py b/tests/test_process.py
index 4f61274..1ae8e92 100644
--- a/tests/test_process.py
+++ b/tests/test_process.py
@@ -738,11 +738,7 @@ class ProcessCoverageMixin(object):
else: # pragma: not covered
raise Exception("Couldn't find a place for the .pth file")
- self.addCleanup(self.remove_pth_path)
-
- def remove_pth_path(self):
- # Clean up the .pth file we made.
- os.remove(self.pth_path)
+ self.addCleanup(os.remove, self.pth_path)
class ProcessStartupTest(ProcessCoverageMixin, CoverageTest):