diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2015-02-09 10:55:46 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2015-02-09 10:55:46 -0500 |
commit | c241ca7e844eafc5f06bdac8852c8b026cfa0c83 (patch) | |
tree | f9e0c65d7f0c41ddb2bba46bd4ebc9aaffbd07b0 /tests/test_process.py | |
parent | 3f5d571b0146531ceae5c57ed15fafaca3202be7 (diff) | |
download | python-coveragepy-git-c241ca7e844eafc5f06bdac8852c8b026cfa0c83.tar.gz |
Remove (most) tearDown functions in favor of addCleanup
Diffstat (limited to 'tests/test_process.py')
-rw-r--r-- | tests/test_process.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_process.py b/tests/test_process.py index 5ab6ba69..4f612748 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) |