summaryrefslogtreecommitdiff
path: root/mailman/testing/helpers.py
diff options
context:
space:
mode:
authorBarry Warsaw2008-12-23 17:33:37 -0500
committerBarry Warsaw2008-12-23 17:33:37 -0500
commitd4de7996e6d4fb5db04dfed3b3fd12747622b164 (patch)
treeda5485447a128a0dd857a2a492168deec838362b /mailman/testing/helpers.py
parentfd600d3952393dc9808fefb9be871f78cdbdff39 (diff)
downloadmailman-d4de7996e6d4fb5db04dfed3b3fd12747622b164.tar.gz
mailman-d4de7996e6d4fb5db04dfed3b3fd12747622b164.tar.zst
mailman-d4de7996e6d4fb5db04dfed3b3fd12747622b164.zip
Diffstat (limited to 'mailman/testing/helpers.py')
-rw-r--r--mailman/testing/helpers.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/mailman/testing/helpers.py b/mailman/testing/helpers.py
index 0f9c3edae..2f5b4af01 100644
--- a/mailman/testing/helpers.py
+++ b/mailman/testing/helpers.py
@@ -58,14 +58,19 @@ def make_testable_runner(runner_class):
:return: A runner instance.
"""
+ assert runner_class.__name__.endswith('Runner'), (
+ 'Unparseable runner class name: %s' % runner_class.__name__)
+
+ name = runner_class.__name__[:-6].lower()
+
class EmptyingRunner(runner_class):
"""Stop processing when the queue is empty."""
def _do_periodic(self):
"""Stop when the queue is empty."""
- self._stop = (len(self._switchboard.files) == 0)
+ self._stop = (len(self.switchboard.files) == 0)
- return EmptyingRunner()
+ return EmptyingRunner(name)