mirror of
https://git.code.sf.net/p/archivemail/code
synced 2025-01-03 05:34:58 +00:00
Remove unused method Mbox.is_empty()
This commit is contained in:
parent
a78af4c0ff
commit
37f96c1c84
2 changed files with 0 additions and 20 deletions
|
@ -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:
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue