diff options
| author | Barry Warsaw | 2014-10-13 15:24:24 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2014-10-13 15:24:24 -0400 |
| commit | 8bc9e217f5c367794b05105bfc80fffac0e4b863 (patch) | |
| tree | ab83ccf1bf806bbeddbcf413e17623e8bba9b2b1 /src/mailman/testing/layers.py | |
| parent | b8715f08a812906fe02289fe4213667ca8f0437e (diff) | |
| parent | 1a2868b416a139a0cb62fb33bc4225560e19958a (diff) | |
| download | mailman-8bc9e217f5c367794b05105bfc80fffac0e4b863.tar.gz mailman-8bc9e217f5c367794b05105bfc80fffac0e4b863.tar.zst mailman-8bc9e217f5c367794b05105bfc80fffac0e4b863.zip | |
Diffstat (limited to 'src/mailman/testing/layers.py')
| -rw-r--r-- | src/mailman/testing/layers.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mailman/testing/layers.py b/src/mailman/testing/layers.py index 4a9841fc2..38aa3907f 100644 --- a/src/mailman/testing/layers.py +++ b/src/mailman/testing/layers.py @@ -48,6 +48,7 @@ import tempfile from lazr.config import as_boolean from pkg_resources import resource_string from textwrap import dedent +from zope import event from zope.component import getUtility from mailman.config import config @@ -98,7 +99,9 @@ class ConfigLayer(MockAndMonkeyLayer): # Set up the basic configuration stuff. Turn off path creation until # we've pushed the testing config. config.create_paths = False - initialize.initialize_1(INHIBIT_CONFIG_FILE) + if not event.subscribers: + # Only if not yet initialized by another layer. + initialize.initialize_1(INHIBIT_CONFIG_FILE) assert cls.var_dir is None, 'Layer already set up' # Calculate a temporary VAR_DIR directory so that run-time artifacts # of the tests won't tread on the installation's data. This also |
