diff options
| author | Barry Warsaw | 2008-09-21 18:11:26 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2008-09-21 18:11:26 -0400 |
| commit | a2234211b97797aebf2c3c3d615ae436bbfb280b (patch) | |
| tree | 6f5c646b676045f9505bc0e99ccfb876435f393d /mailman/tests/test_documentation.py | |
| parent | a29f10d75e3738e9498bc8c6d67c4fc5a6924210 (diff) | |
| parent | 211a82ddb463ac044ba20d51208e5f5a169dcb6c (diff) | |
| download | mailman-a2234211b97797aebf2c3c3d615ae436bbfb280b.tar.gz mailman-a2234211b97797aebf2c3c3d615ae436bbfb280b.tar.zst mailman-a2234211b97797aebf2c3c3d615ae436bbfb280b.zip | |
mergeRF
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': |
