diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unittests/test_util.py | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/tests/unittests/test_util.py b/tests/unittests/test_util.py index aea1aabb..ba565b29 100644 --- a/tests/unittests/test_util.py +++ b/tests/unittests/test_util.py @@ -101,12 +101,8 @@ class TestGetCfgOptionListOrStr(TestCase): class TestWriteFile(MockerTestCase): def setUp(self): super(TestWriteFile, self).setUp() - # Make a temp directoy for tests to use. self.tmp = self.makeDir(prefix="unittest_") - def tearDown(self): - super(TestWriteFile, self).tearDown() - def test_basic_usage(self): """Verify basic usage with default args.""" path = os.path.join(self.tmp, "NewFile.txt") @@ -182,16 +178,10 @@ class TestWriteFile(MockerTestCase): pass -class TestDeleteDirContents(TestCase): +class TestDeleteDirContents(MockerTestCase): def setUp(self): super(TestDeleteDirContents, self).setUp() - # Make a temp directoy for tests to use. - self.tmp = mkdtemp(prefix="unittest_") - - def tearDown(self): - super(TestDeleteDirContents, self).tearDown() - # Clean up temp directory - rmtree(self.tmp) + self.tmp = self.makeDir(prefix="unittest_") def assertDirEmpty(self, dirname): self.assertEqual([], os.listdir(dirname)) |