diff options
| author | Barry Warsaw | 2008-09-20 00:33:07 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2008-09-20 00:33:07 -0400 |
| commit | 211a82ddb463ac044ba20d51208e5f5a169dcb6c (patch) | |
| tree | 77989d93988a32af4c92b5b1b9b7adf0c8fe15b1 /mailman/tests/test_documentation.py | |
| parent | b42f3204f7223f3ce9ae306dcb2cec10853eca8d (diff) | |
| download | mailman-211a82ddb463ac044ba20d51208e5f5a169dcb6c.tar.gz mailman-211a82ddb463ac044ba20d51208e5f5a169dcb6c.tar.zst mailman-211a82ddb463ac044ba20d51208e5f5a169dcb6c.zip | |
Diffstat (limited to 'mailman/tests/test_documentation.py')
| -rw-r--r-- | mailman/tests/test_documentation.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mailman/tests/test_documentation.py b/mailman/tests/test_documentation.py index 2d42f989d..13ffd8cbf 100644 --- a/mailman/tests/test_documentation.py +++ b/mailman/tests/test_documentation.py @@ -53,6 +53,14 @@ def specialized_message_from_string(text): return message +def stop(): + """Call into pdb.set_trace()""" + # Do the import here so that you get the wacky special hacked pdb instead + # of Python's normal pdb. + import pdb + pdb.set_trace() + + def setup(testobj): """Test setup.""" smtpd = SMTPServer() @@ -64,6 +72,10 @@ def setup(testobj): testobj.globs['message_from_string'] = specialized_message_from_string testobj.globs['commit'] = config.db.commit testobj.globs['smtpd'] = smtpd + testobj.globs['stop'] = stop + # Stash the current state of the global domains away for restoration in + # the teardown. + testobj._domains = config.domains.copy() @@ -71,6 +83,8 @@ def cleaning_teardown(testobj): """Clear all persistent data at the end of a doctest.""" # Clear the database of all rows. config.db._reset() + # Reset the global domains. + config.domains = testobj._domains # Remove all but the default style. for style in style_manager.styles: if style.name <> 'default': |
