summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2014-06-23 14:05:57 +0200
committerClaude Paroz <claude@2xlibre.net>2014-06-23 14:06:04 +0200
commit1d9596025e53a33763d9dbb61e7dda015ec60b25 (patch)
treeffd3216c7f8d5438dd829edac01ba41c17aa06e7
parent18b3788401e823266a560b12000697da04490beb (diff)
Ensured cache tests do not leak temp dirs
Refs #17215.
-rw-r--r--tests/cache/tests.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/cache/tests.py b/tests/cache/tests.py
index d4255e5fa0..4677791fcd 100644
--- a/tests/cache/tests.py
+++ b/tests/cache/tests.py
@@ -1151,8 +1151,9 @@ class FileBasedCacheTests(BaseCacheTests, TestCase):
cache_params.update({'LOCATION': self.dirname})
def tearDown(self):
- shutil.rmtree(self.dirname)
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):
fname = os.path.join(self.dirname, 'not-a-cache-file')