]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Merged revisions 87377 via svnmerge from
authorEzio Melotti <ezio.melotti@gmail.com>
Sat, 18 Dec 2010 17:55:43 +0000 (17:55 +0000)
committerEzio Melotti <ezio.melotti@gmail.com>
Sat, 18 Dec 2010 17:55:43 +0000 (17:55 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87377 | ezio.melotti | 2010-12-18 18:31:58 +0100 (Sat, 18 Dec 2010) | 1 line

  Use lowercase true/false in assertTrue/assertFalse messages.
........

Lib/test/test_unittest.py
Lib/unittest.py

index ae91a877cbc3cd3d167d211938155c5ed619ac2b..21e0806a31ba5876499639e06f05a9f6bf8610f0 100644 (file)
@@ -3010,13 +3010,13 @@ class TestLongMessage(TestCase):
 
     def testAssertTrue(self):
         self.assertMessages('assertTrue', (False,),
-                            ["^False is not True$", "^oops$", "^False is not True$",
-                             "^False is not True : oops$"])
+                            ["^False is not true$", "^oops$", "^False is not true$",
+                             "^False is not true : oops$"])
 
     def testAssertFalse(self):
         self.assertMessages('assertFalse', (True,),
-                            ["^True is not False$", "^oops$", "^True is not False$",
-                             "^True is not False : oops$"])
+                            ["^True is not false$", "^oops$", "^True is not false$",
+                             "^True is not false : oops$"])
 
     def testNotEqual(self):
         self.assertMessages('assertNotEqual', (1, 1),
index 9f5cea5e8bc40e1b374497df0e03243b7ca2e033..03a11b7d1ce8e35f448b0f52a261b959aac23c3c 100644 (file)
@@ -540,15 +540,15 @@ class TestCase(object):
         raise self.failureException(msg)
 
     def assertFalse(self, expr, msg=None):
-        "Fail the test if the expression is true."
+        """Check that the expression is false."""
         if expr:
-            msg = self._formatMessage(msg, "%r is not False" % expr)
+            msg = self._formatMessage(msg, "%r is not false" % expr)
             raise self.failureException(msg)
 
     def assertTrue(self, expr, msg=None):
-        """Fail the test unless the expression is true."""
+        """Check that the expression is true."""
         if not expr:
-            msg = self._formatMessage(msg, "%r is not True" % expr)
+            msg = self._formatMessage(msg, "%r is not true" % expr)
             raise self.failureException(msg)
 
     def _formatMessage(self, msg, standardMsg):