summaryrefslogtreecommitdiff
path: root/src/mailman/tests/test_documentation.py
diff options
context:
space:
mode:
authorBarry Warsaw2012-04-02 13:07:21 -0600
committerBarry Warsaw2012-04-02 13:07:21 -0600
commit2c4779c884d2bb09bed6838b7b5cd938d5755f2e (patch)
treed72e1b7db3922a02b579b56ee11e0c22c6111ad6 /src/mailman/tests/test_documentation.py
parentacd5b05d06248b66752122d4c74cac0f5352f815 (diff)
downloadmailman-2c4779c884d2bb09bed6838b7b5cd938d5755f2e.tar.gz
mailman-2c4779c884d2bb09bed6838b7b5cd938d5755f2e.tar.zst
mailman-2c4779c884d2bb09bed6838b7b5cd938d5755f2e.zip
Diffstat (limited to 'src/mailman/tests/test_documentation.py')
-rw-r--r--src/mailman/tests/test_documentation.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mailman/tests/test_documentation.py b/src/mailman/tests/test_documentation.py
index f459f3a92..a2c1ab592 100644
--- a/src/mailman/tests/test_documentation.py
+++ b/src/mailman/tests/test_documentation.py
@@ -178,6 +178,14 @@ def setup(testobj):
testobj.globs['smtpd'] = SMTPLayer.smtpd
testobj.globs['stop'] = stop
testobj.globs['transaction'] = config.db
+ # Add this so that cleanups can be automatically added by the doctest.
+ testobj.globs['cleanups'] = []
+
+
+
+def teardown(testobj):
+ for cleanup in testobj.globs['cleanups']:
+ cleanup()
@@ -223,7 +231,8 @@ def test_suite():
path,
package='mailman',
optionflags=flags,
- setUp=setup)
+ setUp=setup,
+ tearDown=teardown)
test.layer = layer
suite.addTest(test)
return suite