aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolaus Schulz <microschulz@web.de>2008-08-05 18:23:52 +0200
committerNikolaus Schulz <microschulz@web.de>2009-11-06 21:09:40 +0100
commit37f96c1c840a62e9ef85dedb6d8a3079cb3c32ac (patch)
tree27f36f040814bd3f75785b37eb17d48d5fa789c6
parenta78af4c0ff4f0ad70a1d7756b005f3c5441f810c (diff)
downloadarchivemail-37f96c1c840a62e9ef85dedb6d8a3079cb3c32ac.tar.gz
archivemail-37f96c1c840a62e9ef85dedb6d8a3079cb3c32ac.tar.bz2
archivemail-37f96c1c840a62e9ef85dedb6d8a3079cb3c32ac.zip
Remove unused method Mbox.is_empty()
-rwxr-xr-xarchivemail.py4
-rwxr-xr-xtest_archivemail.py16
2 files changed, 0 insertions, 20 deletions
diff --git a/archivemail.py b/archivemail.py
index 2550b67..1887ee1 100755
--- a/archivemail.py
+++ b/archivemail.py
@@ -395,10 +395,6 @@ class Mbox(mailbox.UnixMailbox):
vprint("removing file '%s'" % self.mbox_file_name)
os.remove(file_name)
- def is_empty(self):
- """Return true if the 'mbox' file is empty, false otherwise"""
- return (os.path.getsize(self.mbox_file_name) == 0)
-
def close(self):
"""Close the mbox file"""
if not self.mbox_file_closed:
diff --git a/test_archivemail.py b/test_archivemail.py
index 9cf1986..b79934f 100755
--- a/test_archivemail.py
+++ b/test_archivemail.py
@@ -99,22 +99,6 @@ class TestCaseInTempdir(unittest.TestCase):
############ Mbox Class testing ##############
-class TestMboxIsEmpty(TestCaseInTempdir):
- def setUp(self):
- super(TestMboxIsEmpty, self).setUp()
- self.empty_name = make_mbox(messages=0)
- self.not_empty_name = make_mbox(messages=1)
-
- def testEmpty(self):
- """is_empty() should be true for an empty mbox"""
- mbox = archivemail.Mbox(self.empty_name)
- assert(mbox.is_empty())
-
- def testNotEmpty(self):
- """is_empty() should be false for a non-empty mbox"""
- mbox = archivemail.Mbox(self.not_empty_name)
- assert(not mbox.is_empty())
-
class TestMboxLeaveEmpty(TestCaseInTempdir):
def setUp(self):
super(TestMboxLeaveEmpty, self).setUp()