aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolaus Schulz <microschulz@web.de>2008-11-21 15:17:48 +0100
committerNikolaus Schulz <microschulz@web.de>2010-07-29 15:46:15 +0200
commit2ce89ef5085957418fe7f1a65c77425a5a3c11ee (patch)
treee0f56ee5addfe6c7ea81cbc0fb91c69953fb1822
parent7058290c2e549e6374a33184d72f9d6556ff4cdf (diff)
downloadarchivemail-2ce89ef5085957418fe7f1a65c77425a5a3c11ee.tar.gz
archivemail-2ce89ef5085957418fe7f1a65c77425a5a3c11ee.tar.bz2
archivemail-2ce89ef5085957418fe7f1a65c77425a5a3c11ee.zip
test suite: remove unused remove() methods from maildir classes
For cleanup of temporary files, we lean on shutil.rmtree anyway, so don't bother wasting more code on this.
-rwxr-xr-xtest_archivemail.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/test_archivemail.py b/test_archivemail.py
index c2fe5d2..665cf9c 100755
--- a/test_archivemail.py
+++ b/test_archivemail.py
@@ -60,7 +60,6 @@ import unittest
import gzip
import cStringIO
import rfc822
-import errno
import mailbox
try:
@@ -144,14 +143,6 @@ class IndexedMailboxDir:
"""Return all relative pathnames of files in this mailbox."""
return self.msg_id_dict.values()
- def clear(self):
- """Remove all messages in this mailbox."""
- for relpath in self.msg_id_dict.values():
- try: os.remove(os.path.join(self.root, relpath))
- except OSError, e:
- if e.errno != errno.ENOENT: raise
- self.msg_id_dict.clear()
-
class SimpleMaildir(IndexedMailboxDir):
"""Primitive Maildir class, just good enough for generating short-lived
test maildirs."""
@@ -177,14 +168,6 @@ class SimpleMaildir(IndexedMailboxDir):
f.close()
self._add_to_index(msg_str, relpath)
- def remove(self):
- """Remove all files and directories that comprise this mailbox."""
- self.clear()
- for d in "cur", "new", "tmp":
- os.rmdir(os.path.join(self.root, d))
- os.rmdir(self.root)
- self.root = None
-
def _mkname(self, new, flags):
"""Generate a unique filename for a new message."""
validflags = 'DFPRST'