summaryrefslogtreecommitdiff
path: root/src/mailman/testing/layers.py
diff options
context:
space:
mode:
authorBarry Warsaw2016-04-30 13:33:25 -0400
committerGitLab2016-04-30 19:54:54 +0000
commit465f24ff33e154385322ee894d32d8b7dd9b3941 (patch)
treebf0295a1ce81b2c57f51e7ed84b21891342587c2 /src/mailman/testing/layers.py
parenta584987573e9b2b73e5cfd6012b4b1af6d4e4b1c (diff)
downloadmailman-465f24ff33e154385322ee894d32d8b7dd9b3941.tar.gz
mailman-465f24ff33e154385322ee894d32d8b7dd9b3941.tar.zst
mailman-465f24ff33e154385322ee894d32d8b7dd9b3941.zip
Diffstat (limited to 'src/mailman/testing/layers.py')
-rw-r--r--src/mailman/testing/layers.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mailman/testing/layers.py b/src/mailman/testing/layers.py
index c282689d1..3c65d0b2a 100644
--- a/src/mailman/testing/layers.py
+++ b/src/mailman/testing/layers.py
@@ -184,8 +184,12 @@ class ConfigLayer(MockAndMonkeyLayer):
# Destroy the test database after the tests are done so that there is
# no data in case the tests are rerun with a database layer like mysql
# or postgresql which are not deleted in teardown.
- config.pop('test config')
shutil.rmtree(cls.var_dir)
+ config.pop('test config')
+ # Now config.VAR_DIR will point to the current directory's 'var'
+ # directory, which will have been created in config.pop()'s post
+ # processing. Clean that up too.
+ shutil.rmtree(config.VAR_DIR, ignore_errors=True)
cls.var_dir = None
@classmethod