mirror of
https://github.com/python/cpython.git
synced 2025-08-23 02:04:56 +00:00
Merged revisions 87377 via svnmerge from
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. ........
This commit is contained in:
parent
3f752ab22e
commit
c139a5683b
2 changed files with 8 additions and 8 deletions
|
@ -393,15 +393,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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue