summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-12-18 17:31:58 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2010-12-18 17:31:58 (GMT)
commit3044fa77a52bf3756ac2ba25baa1c1f23592ec99 (patch)
tree5921dc3cb6e62d67bd9568e35b4fc373aff8804a
parentb68a7bc70c74d96eb1aa448629e3c3875ab206e6 (diff)
downloadcpython-3044fa77a52bf3756ac2ba25baa1c1f23592ec99.zip
cpython-3044fa77a52bf3756ac2ba25baa1c1f23592ec99.tar.gz
cpython-3044fa77a52bf3756ac2ba25baa1c1f23592ec99.tar.bz2
Use lowercase true/false in assertTrue/assertFalse messages.
-rw-r--r--Lib/unittest/case.py8
-rw-r--r--Lib/unittest/test/test_assertions.py8
2 files changed, 8 insertions, 8 deletions
diff --git a/Lib/unittest/case.py b/Lib/unittest/case.py
index 6752e7a..d6e80e8 100644
--- a/Lib/unittest/case.py
+++ b/Lib/unittest/case.py
@@ -477,15 +477,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, "%s is not False" % safe_repr(expr))
+ msg = self._formatMessage(msg, "%s is not false" % safe_repr(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, "%s is not True" % safe_repr(expr))
+ msg = self._formatMessage(msg, "%s is not true" % safe_repr(expr))
raise self.failureException(msg)
def _formatMessage(self, msg, standardMsg):
diff --git a/Lib/unittest/test/test_assertions.py b/Lib/unittest/test/test_assertions.py
index df2e89e..c81db24 100644
--- a/Lib/unittest/test/test_assertions.py
+++ b/Lib/unittest/test/test_assertions.py
@@ -166,13 +166,13 @@ class TestLongMessage(unittest.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),