From df0c3776c29d6cc6effd9bcec68fd06d7abde4b7 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Sun, 29 Oct 2017 17:01:42 +0100 Subject: testutil: Simplify tests to use shutil.rmtree() for tempdir --- tests/test_find_top_level.py | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'tests/test_find_top_level.py') diff --git a/tests/test_find_top_level.py b/tests/test_find_top_level.py index deaee9c..2218799 100644 --- a/tests/test_find_top_level.py +++ b/tests/test_find_top_level.py @@ -164,10 +164,6 @@ class TestCrossDevice(TempDirTestCase): super(TestCrossDevice, self).setUp() os.symlink('/proc', os.path.join(self.dir, 'test')) - def tearDown(self): - os.unlink(os.path.join(self.dir, 'test')) - super(TestCrossDevice, self).tearDown() - def test_find_top_level_manifest(self): self.assertIsNone( gemato.find_top_level.find_top_level_manifest( @@ -188,10 +184,6 @@ class TestCrossDeviceManifest(TempDirTestCase): super(TestCrossDeviceManifest, self).setUp() os.symlink('/proc/version', os.path.join(self.dir, 'Manifest')) - def tearDown(self): - os.unlink(os.path.join(self.dir, 'Manifest')) - super(TestCrossDeviceManifest, self).tearDown() - def test_find_top_level_manifest(self): self.assertIsNone( gemato.find_top_level.find_top_level_manifest( @@ -215,11 +207,6 @@ class TestCompressedManifest(TempDirTestCase): with gzip.GzipFile(os.path.join(self.dir, 'subc/sub/Manifest.gz'), 'wb'): pass - def tearDown(self): - os.unlink(os.path.join(self.dir, 'subc/sub/Manifest.gz')) - os.unlink(os.path.join(self.dir, 'Manifest.gz')) - super(TestCompressedManifest, self).tearDown() - def test_find_top_level_manifest(self): self.assertEqual( os.path.relpath( @@ -266,11 +253,6 @@ class TestCompressedManifestWithIgnore(TempDirTestCase): with gzip.GzipFile(os.path.join(self.dir, 'subc/sub/Manifest.gz'), 'wb'): pass - def tearDown(self): - os.unlink(os.path.join(self.dir, 'subc/sub/Manifest.gz')) - os.unlink(os.path.join(self.dir, 'Manifest.gz')) - super(TestCompressedManifestWithIgnore, self).tearDown() - def test_find_top_level_manifest(self): self.assertEqual( os.path.relpath( -- cgit v1.2.3