summaryrefslogtreecommitdiff
path: root/tests/test_api.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2017-02-11 14:01:04 -0500
committerNed Batchelder <ned@nedbatchelder.com>2017-02-11 14:01:04 -0500
commite881ebbfc610e14323246526e19b3ed33e8df050 (patch)
treed4557963f3185053963fe544945d24cbf1aab41d /tests/test_api.py
parent478d601975c5f9f66fc2a8a18df447a619d45d50 (diff)
downloadpython-coveragepy-e881ebbfc610e14323246526e19b3ed33e8df050.tar.gz
Use the test-specific chdir method
Diffstat (limited to 'tests/test_api.py')
-rw-r--r--tests/test_api.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/test_api.py b/tests/test_api.py
index eaeabcb..7530aca 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -376,9 +376,7 @@ class UsingModulesMixin(object):
def setUp(self):
super(UsingModulesMixin, self).setUp()
- old_dir = os.getcwd()
- os.chdir(self.nice_file(os.path.dirname(__file__), 'modules'))
- self.addCleanup(os.chdir, old_dir)
+ self.chdir(self.nice_file(os.path.dirname(__file__), 'modules'))
# Parent class saves and restores sys.path, we can just modify it.
sys.path.append(".")