summaryrefslogtreecommitdiff
path: root/Mailman/testing/test_documentation.py
diff options
context:
space:
mode:
authorBarry Warsaw2007-06-27 23:01:56 -0400
committerBarry Warsaw2007-06-27 23:01:56 -0400
commit4053185269d20fff1e4cef20017eeef2d343be92 (patch)
tree6c7933f933b5f315217a249e182645e570f964c3 /Mailman/testing/test_documentation.py
parent9344d94ef8e0a92a27517b5bd5b34f57c9b7bfaa (diff)
downloadmailman-4053185269d20fff1e4cef20017eeef2d343be92.tar.gz
mailman-4053185269d20fff1e4cef20017eeef2d343be92.tar.zst
mailman-4053185269d20fff1e4cef20017eeef2d343be92.zip
Repair docfiles broken with the new ISwitchboard interface. Mostly these were
due to the change from the method Switchboard.files() to the generator property Switchboard.files. Add support in cleaning_teardown() for the doctests for removing all queue files leftover after a test is complete. This way, failures in one test that queues files won't break all subsequent such tests. Update the 2.1.9 section of the NEWS.txt file from the Mailman 2.1 branch.
Diffstat (limited to 'Mailman/testing/test_documentation.py')
-rw-r--r--Mailman/testing/test_documentation.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Mailman/testing/test_documentation.py b/Mailman/testing/test_documentation.py
index 99c2ffbae..144e6f64b 100644
--- a/Mailman/testing/test_documentation.py
+++ b/Mailman/testing/test_documentation.py
@@ -31,6 +31,7 @@ COMMASPACE = ', '
def cleaning_teardown(testobj):
+ # Remove all users, addresses and members, then delete all mailing lists.
for user in config.user_manager.users:
config.user_manager.delete_user(user)
for address in config.user_manager.addresses:
@@ -49,6 +50,10 @@ def cleaning_teardown(testobj):
'There should be no users left!')
assert not list(config.user_manager.addresses), (
'There should be no addresses left!')
+ # Remove all queue files.
+ for dirpath, dirnames, filenames in os.walk(config.QUEUE_DIR):
+ for filename in filenames:
+ os.remove(os.path.join(dirpath, filename))