summaryrefslogtreecommitdiff
path: root/src/mailman/testing/helpers.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/testing/helpers.py')
-rw-r--r--src/mailman/testing/helpers.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mailman/testing/helpers.py b/src/mailman/testing/helpers.py
index 01b362192..233b03cf8 100644
--- a/src/mailman/testing/helpers.py
+++ b/src/mailman/testing/helpers.py
@@ -568,3 +568,11 @@ def hackenv(envar, new_value):
del os.environ[envar]
else:
os.environ[envar] = old_value
+
+
+def nose2_start_test_run_callback(plugin):
+ from mailman.testing.layers import ConfigLayer, MockAndMonkeyLayer
+ MockAndMonkeyLayer.testing_mode = True
+ if (plugin.stderr or
+ len(os.environ.get('MM_VERBOSE_TESTLOG', '').strip()) > 0):
+ ConfigLayer.stderr = True