summaryrefslogtreecommitdiff
path: root/src/mailman/tests/test_documentation.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/tests/test_documentation.py')
-rw-r--r--src/mailman/tests/test_documentation.py20
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