Kaydet (Commit) 1d959602 authored tarafından Claude Paroz's avatar Claude Paroz

Ensured cache tests do not leak temp dirs

Refs #17215.
üst 18b37884
...@@ -1151,8 +1151,9 @@ class FileBasedCacheTests(BaseCacheTests, TestCase): ...@@ -1151,8 +1151,9 @@ class FileBasedCacheTests(BaseCacheTests, TestCase):
cache_params.update({'LOCATION': self.dirname}) cache_params.update({'LOCATION': self.dirname})
def tearDown(self): def tearDown(self):
shutil.rmtree(self.dirname)
super(FileBasedCacheTests, self).tearDown() super(FileBasedCacheTests, self).tearDown()
# Call parent first, as cache.clear() may recreate cache base directory
shutil.rmtree(self.dirname)
def test_ignores_non_cache_files(self): def test_ignores_non_cache_files(self):
fname = os.path.join(self.dirname, 'not-a-cache-file') fname = os.path.join(self.dirname, 'not-a-cache-file')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment