From 51181b8540372b9b83bbab51cae548992c497682 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Thu, 21 Jun 2012 15:59:57 -0700 Subject: Missed some other mkdtemp and rmtree calls no longer needed --- tests/unittests/test_util.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'tests') 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)) -- cgit v1.2.3