summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_old_mailbox.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-07-11 12:20:59 (GMT)
committerGuido van Rossum <guido@python.org>2007-07-11 12:20:59 (GMT)
commite61fd5b5ed9d677da2f3349078d7f66f707199de (patch)
treee28a7630ed3c285eabc7631f4276a2b06e74682b /Lib/test/test_old_mailbox.py
parentc9b9de17976a4832f505309b1096f9a7582c7be9 (diff)
downloadcpython-e61fd5b5ed9d677da2f3349078d7f66f707199de.zip
cpython-e61fd5b5ed9d677da2f3349078d7f66f707199de.tar.gz
cpython-e61fd5b5ed9d677da2f3349078d7f66f707199de.tar.bz2
Patch by Christian Heimes to change self.assert_(x == y) into
self.assertEqual(x, y). (Christian used self.failUnlessEqual(), but the double negative makes it hard to grok, so I changed it.)
Diffstat (limited to 'Lib/test/test_old_mailbox.py')
-rw-r--r--Lib/test/test_old_mailbox.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_old_mailbox.py b/Lib/test/test_old_mailbox.py
index b881506..3176310 100644
--- a/Lib/test/test_old_mailbox.py
+++ b/Lib/test/test_old_mailbox.py
@@ -67,14 +67,14 @@ class MaildirTestCase(unittest.TestCase):
"""Test an empty maildir mailbox"""
# Test for regression on bug #117490:
self.mbox = mailbox.Maildir(test_support.TESTFN)
- self.assert_(len(self.mbox) == 0)
+ self.assertEqual(len(self.mbox), 0)
self.assert_(self.mbox.next() is None)
self.assert_(self.mbox.next() is None)
def test_nonempty_maildir_cur(self):
self.createMessage("cur")
self.mbox = mailbox.Maildir(test_support.TESTFN)
- self.assert_(len(self.mbox) == 1)
+ self.assertEqual(len(self.mbox), 1)
self.assert_(self.mbox.next() is not None)
self.assert_(self.mbox.next() is None)
self.assert_(self.mbox.next() is None)
@@ -82,7 +82,7 @@ class MaildirTestCase(unittest.TestCase):
def test_nonempty_maildir_new(self):
self.createMessage("new")
self.mbox = mailbox.Maildir(test_support.TESTFN)
- self.assert_(len(self.mbox) == 1)
+ self.assertEqual(len(self.mbox), 1)
self.assert_(self.mbox.next() is not None)
self.assert_(self.mbox.next() is None)
self.assert_(self.mbox.next() is None)
@@ -91,7 +91,7 @@ class MaildirTestCase(unittest.TestCase):
self.createMessage("cur")
self.createMessage("new")
self.mbox = mailbox.Maildir(test_support.TESTFN)
- self.assert_(len(self.mbox) == 2)
+ self.assertEqual(len(self.mbox), 2)
self.assert_(self.mbox.next() is not None)
self.assert_(self.mbox.next() is not None)
self.assert_(self.mbox.next() is None)
@@ -139,7 +139,7 @@ body4
""")
f.close()
box = mailbox.UnixMailbox(open(self._path, 'r'))
- self.assert_(len(list(iter(box))) == 4)
+ self.assertEqual(len(list(iter(box))), 4)
# XXX We still need more tests!