diff options
| author | Barry Warsaw | 2012-04-08 10:15:29 -0600 |
|---|---|---|
| committer | Barry Warsaw | 2012-04-08 10:15:29 -0600 |
| commit | 2410fe8c2578fbd11275cfc7fc1897173eecd41a (patch) | |
| tree | 77d5e612f2efd1844bb777102067f3f658aa499c /src/mailman/tests/test_documentation.py | |
| parent | 7abcd4faa1553fb012020b6204fb8b6208fa5bf2 (diff) | |
| download | mailman-2410fe8c2578fbd11275cfc7fc1897173eecd41a.tar.gz mailman-2410fe8c2578fbd11275cfc7fc1897173eecd41a.tar.zst mailman-2410fe8c2578fbd11275cfc7fc1897173eecd41a.zip | |
Diffstat (limited to 'src/mailman/tests/test_documentation.py')
| -rw-r--r-- | src/mailman/tests/test_documentation.py | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/mailman/tests/test_documentation.py b/src/mailman/tests/test_documentation.py index a2c1ab592..329e0176a 100644 --- a/src/mailman/tests/test_documentation.py +++ b/src/mailman/tests/test_documentation.py @@ -38,7 +38,8 @@ import mailman from mailman.app.lifecycle import create_list from mailman.config import config -from mailman.testing.helpers import call_api, specialized_message_from_string +from mailman.testing.helpers import ( + call_api, chdir, specialized_message_from_string) from mailman.testing.layers import SMTPLayer @@ -46,23 +47,6 @@ DOT = '.' -class chdir: - """A context manager for temporary directory changing.""" - def __init__(self, directory): - self._curdir = None - self._directory = directory - - def __enter__(self): - self._curdir = os.getcwd() - os.chdir(self._directory) - - def __exit__(self, exc_type, exc_val, exc_tb): - os.chdir(self._curdir) - # Don't suppress exceptions. - return False - - - def stop(): """Call into pdb.set_trace()""" # Do the import here so that you get the wacky special hacked pdb instead |
