summaryrefslogtreecommitdiff
path: root/src/mailman/tests/test_documentation.py
diff options
context:
space:
mode:
authorBarry Warsaw2012-07-26 00:22:19 -0400
committerBarry Warsaw2012-07-26 00:22:19 -0400
commit6724d3688f5cf612f722a2d7504eeb50caf8dbe9 (patch)
tree5323a0b94824e7353569c4146b3e94f43aad98de /src/mailman/tests/test_documentation.py
parent01415190ab44e69a8f09a6411564a7cb288404e8 (diff)
parente08c2d6d9ef6c4e6d78c054cecd5829c5711617e (diff)
downloadmailman-6724d3688f5cf612f722a2d7504eeb50caf8dbe9.tar.gz
mailman-6724d3688f5cf612f722a2d7504eeb50caf8dbe9.tar.zst
mailman-6724d3688f5cf612f722a2d7504eeb50caf8dbe9.zip
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