MCPcopy Index your code
hub / github.com/RustPython/RustPython / assertTrue

Method assertTrue

Lib/unittest/case.py:763–767  ·  view source on GitHub ↗

Check that the expression is true.

(self, expr, msg=None)

Source from the content-addressed store, hash-verified

761 raise self.failureException(msg)
762
763 def assertTrue(self, expr, msg=None):
764 """Check that the expression is true."""
765 if not expr:
766 msg = self._formatMessage(msg, "%s is not true" % safe_repr(expr))
767 raise self.failureException(msg)
768
769 def _formatMessage(self, msg, standardMsg):
770 """Honour the longMessage attribute when generating failure messages.

Callers 15

test_astMethod · 0.95
test_enter_concurrentMethod · 0.95
test_priorityMethod · 0.95
test_emptyMethod · 0.95
check_pickleMethod · 0.95
test_iter_idempotencyMethod · 0.95
test_simple_compareMethod · 0.95
test_class_markerMethod · 0.95

Calls 2

_formatMessageMethod · 0.95
safe_reprFunction · 0.85

Tested by 15

test_astMethod · 0.76
test_enter_concurrentMethod · 0.76
test_priorityMethod · 0.76
test_emptyMethod · 0.76
check_pickleMethod · 0.76
test_iter_idempotencyMethod · 0.76
test_simple_compareMethod · 0.76
test_class_markerMethod · 0.76