diff options
Diffstat (limited to 'tests/test_recursiveloader.py')
-rw-r--r-- | tests/test_recursiveloader.py | 46 |
1 files changed, 4 insertions, 42 deletions
diff --git a/tests/test_recursiveloader.py b/tests/test_recursiveloader.py index 68ed602..2b8fef9 100644 --- a/tests/test_recursiveloader.py +++ b/tests/test_recursiveloader.py @@ -1579,10 +1579,6 @@ DATA sub/version 0 MD5 d41d8cd98f00b204e9800998ecf8427e super(CrossDeviceManifestTest, self).setUp() os.symlink('/proc', os.path.join(self.dir, 'sub')) - def tearDown(self): - os.unlink(os.path.join(self.dir, 'sub')) - super(CrossDeviceManifestTest, self).tearDown() - def test_assert_directory_verifies(self): m = gemato.recursiveloader.ManifestRecursiveLoader( os.path.join(self.dir, 'Manifest')) @@ -1635,10 +1631,6 @@ class CrossDeviceEmptyManifestTest(TempDirTestCase): super(CrossDeviceEmptyManifestTest, self).setUp() os.symlink('/proc', os.path.join(self.dir, 'sub')) - def tearDown(self): - os.unlink(os.path.join(self.dir, 'sub')) - super(CrossDeviceEmptyManifestTest, self).tearDown() - def test_assert_directory_verifies(self): m = gemato.recursiveloader.ManifestRecursiveLoader( os.path.join(self.dir, 'Manifest')) @@ -1693,10 +1685,6 @@ IGNORE sub super(CrossDeviceIgnoreManifestTest, self).setUp() os.symlink('/proc', os.path.join(self.dir, 'sub')) - def tearDown(self): - os.unlink(os.path.join(self.dir, 'sub')) - super(CrossDeviceIgnoreManifestTest, self).tearDown() - def test_assert_directory_verifies(self): m = gemato.recursiveloader.ManifestRecursiveLoader( os.path.join(self.dir, 'Manifest')) @@ -1808,6 +1796,10 @@ class UnreadableDirectoryTest(TempDirTestCase): super(UnreadableDirectoryTest, self).setUp() os.chmod(os.path.join(self.dir, 'test'), 0) + def tearDown(self): + os.chmod(os.path.join(self.dir, 'test'), 0o555) + super(UnreadableDirectoryTest, self).tearDown() + def test_assert_directory_verifies(self): m = gemato.recursiveloader.ManifestRecursiveLoader( os.path.join(self.dir, 'Manifest')) @@ -1838,10 +1830,6 @@ DATA test 0 MD5 d41d8cd98f00b204e9800998ecf8427e with gzip.GzipFile(self.manifest_gz, 'wb') as f: f.write(self.MANIFEST) - def tearDown(self): - os.unlink(self.manifest_gz) - super(CompressedTopManifestTest, self).tearDown() - def test_find_path_entry(self): m = gemato.recursiveloader.ManifestRecursiveLoader( self.manifest_gz) @@ -1906,10 +1894,6 @@ MANIFEST sub/Manifest.gz 78 MD5 9c158f87b2445279d7c8aac439612fba with io.open(self.manifest_gz, 'wb') as f: f.write(base64.b64decode(self.SUB_MANIFEST)) - def tearDown(self): - os.unlink(self.manifest_gz) - super(CompressedSubManifestTest, self).tearDown() - def test_find_path_entry(self): m = gemato.recursiveloader.ManifestRecursiveLoader( os.path.join(self.dir, 'Manifest')) @@ -1964,10 +1948,6 @@ MANIFEST a/Manifest 0 MD5 d41d8cd98f00b204e9800998ecf8427e with gzip.GzipFile(self.manifest_gz, 'wb') as f: f.write(self.MANIFEST) - def tearDown(self): - os.unlink(self.manifest_gz) - super(CompressedManifestOrderingTest, self).tearDown() - def test__iter_manifests_for_path_order(self): m = gemato.recursiveloader.ManifestRecursiveLoader( self.manifest_gz) @@ -2089,10 +2069,6 @@ DATA test 0 MD5 d41d8cd98f00b204e9800998ecf8427e os.path.join(self.dir, 'sub/Manifest.gz'), 'wb') as f: f.write(self.SUB_MANIFEST) - def tearDown(self): - os.unlink(self.manifest_gz) - super(UnregisteredCompressedManifestTestCase, self).tearDown() - def test_load_manifests(self): m = gemato.recursiveloader.ManifestRecursiveLoader( os.path.join(self.dir, 'Manifest')) @@ -2188,13 +2164,6 @@ class CreateNewManifestTest(TempDirTestCase): super(CreateNewManifestTest, self).setUp() self.path = os.path.join(self.dir, 'Manifest') - def tearDown(self): - try: - os.unlink(self.path) - except OSError: - pass - super(CreateNewManifestTest, self).tearDown() - def test_load_without_create(self): self.assertRaises(IOError, gemato.recursiveloader.ManifestRecursiveLoader, @@ -2252,13 +2221,6 @@ class CreateNewCompressedManifestTest(TempDirTestCase): super(CreateNewCompressedManifestTest, self).setUp() self.path = os.path.join(self.dir, 'Manifest.gz') - def tearDown(self): - try: - os.unlink(self.path) - except OSError: - pass - super(CreateNewCompressedManifestTest, self).tearDown() - def test_load_without_create(self): self.assertRaises(IOError, gemato.recursiveloader.ManifestRecursiveLoader, |