diff options
Diffstat (limited to 'mailman/testing/helpers.py')
| -rw-r--r-- | mailman/testing/helpers.py | 9 |
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) |
