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

Method assertLess

Lib/unittest/case.py:1298–1302  ·  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

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

Callers 1

test_1_field_compareMethod · 0.95

Calls 3

failMethod · 0.95
_formatMessageMethod · 0.95
safe_reprFunction · 0.85

Tested by 1

test_1_field_compareMethod · 0.76