summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBarry Warsaw2016-03-24 09:36:57 -0400
committerBarry Warsaw2016-03-24 09:36:57 -0400
commit8169b60bc3d5b771f3676ae12c65f6f92c67a76a (patch)
tree6b3101dede99dbb0cdaa59d5a000ea888d0d7d97 /src
parentf51c63ca108134dd30f26641bef15bfcddd6e502 (diff)
downloadmailman-8169b60bc3d5b771f3676ae12c65f6f92c67a76a.tar.gz
mailman-8169b60bc3d5b771f3676ae12c65f6f92c67a76a.tar.zst
mailman-8169b60bc3d5b771f3676ae12c65f6f92c67a76a.zip
Diffstat (limited to 'src')
-rw-r--r--src/mailman/archiving/prototype.py6
-rw-r--r--src/mailman/archiving/tests/test_mhonarc.py5
-rw-r--r--src/mailman/archiving/tests/test_prototype.py13
3 files changed, 3 insertions, 21 deletions
diff --git a/src/mailman/archiving/prototype.py b/src/mailman/archiving/prototype.py
index 73983cf8d..9790129da 100644
--- a/src/mailman/archiving/prototype.py
+++ b/src/mailman/archiving/prototype.py
@@ -17,13 +17,7 @@
"""Prototypical permalinking archiver."""
-__all__ = [
- 'Prototype',
- ]
-
-
import os
-import errno
import logging
from contextlib import suppress
diff --git a/src/mailman/archiving/tests/test_mhonarc.py b/src/mailman/archiving/tests/test_mhonarc.py
index 2cb7ab765..803875bd4 100644
--- a/src/mailman/archiving/tests/test_mhonarc.py
+++ b/src/mailman/archiving/tests/test_mhonarc.py
@@ -17,11 +17,6 @@
"""Test the MHonArc archiver."""
-__all__ = [
- 'TestMhonarc',
- ]
-
-
import os
import sys
import shutil
diff --git a/src/mailman/archiving/tests/test_prototype.py b/src/mailman/archiving/tests/test_prototype.py
index 1f7514f16..54fbc06af 100644
--- a/src/mailman/archiving/tests/test_prototype.py
+++ b/src/mailman/archiving/tests/test_prototype.py
@@ -17,11 +17,6 @@
"""Test the prototype archiver."""
-__all__ = [
- 'TestPrototypeArchiver',
- ]
-
-
import os
import shutil
import tempfile
@@ -63,10 +58,12 @@ but the water deserves to be swum.
# Set up a temporary directory for the prototype archiver so that it's
# easier to clean up.
self._tempdir = tempfile.mkdtemp()
+ self.addCleanup(shutil.rmtree, self._tempdir)
config.push('prototype', """
[paths.testing]
- archive_dir: {0}
+ archive_dir: {}
""".format(self._tempdir))
+ self.addCleanup(config.pop, 'prototype')
# Capture the structure of a maildir.
self._expected_dir_structure = set(
(os.path.join(config.ARCHIVE_DIR, path) for path in (
@@ -78,10 +75,6 @@ but the water deserves to be swum.
)))
self._expected_dir_structure.add(config.ARCHIVE_DIR)
- def tearDown(self):
- shutil.rmtree(self._tempdir)
- config.pop('prototype')
-
def _find(self, path):
all_filenames = set()
for dirpath, dirnames, filenames in os.walk(path):