MCPcopy Index your code
hub / github.com/python/cpython / assertLess

Method assertLess

Lib/unittest/case.py:1293–1297  ·  view source on GitHub ↗

Just like self.assertTrue(a < b), but with a nicer default message.

(self, a, b, msg=None)

Source from the content-addressed store, hash-verified

1291 self.fail(self._formatMessage(msg, standardMsg))
1292
1293 def assertLess(self, a, b, msg=None):
1294 """Just like self.assertTrue(a < b), but with a nicer default message."""
1295 if not a < b:
1296 standardMsg = '%s not less than %s' % (safe_repr(a), safe_repr(b))
1297 self.fail(self._formatMessage(msg, standardMsg))
1298
1299 def assertLessEqual(self, a, b, msg=None):
1300 """Just like self.assertTrue(a <= b), but with a nicer default message."""

Callers 3

_test_set_comparisonsMethod · 0.95
test_1_field_compareMethod · 0.95

Calls 3

failMethod · 0.95
_formatMessageMethod · 0.95
safe_reprFunction · 0.85

Tested by 3

_test_set_comparisonsMethod · 0.76
test_1_field_compareMethod · 0.76