From 8169b60bc3d5b771f3676ae12c65f6f92c67a76a Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Thu, 24 Mar 2016 09:36:57 -0400 Subject: Clean up of archiving subdirectory. --- src/mailman/archiving/prototype.py | 6 ------ src/mailman/archiving/tests/test_mhonarc.py | 5 ----- src/mailman/archiving/tests/test_prototype.py | 13 +++---------- 3 files changed, 3 insertions(+), 21 deletions(-) (limited to 'src') 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): -- cgit v1.2.3-70-g09d2