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

Method assertLessEqual

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

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."""
1301 if not a <= b:
1302 standardMsg = '%s not less than or equal to %s' % (safe_repr(a), safe_repr(b))
1303 self.fail(self._formatMessage(msg, standardMsg))
1304
1305 def assertGreater(self, a, b, msg=None):
1306 """Just like self.assertTrue(a > b), but with a nicer default message."""

Callers 15

_test_set_comparisonsMethod · 0.95
test_0_field_compareMethod · 0.95
test_1_field_compareMethod · 0.95
check_decodeMethod · 0.80
test_cache_boundedMethod · 0.80
test_calcsizeMethod · 0.80
test_language_versionMethod · 0.80
test_len_raceMethod · 0.80
test_cmp_to_keyMethod · 0.80

Calls 3

failMethod · 0.95
_formatMessageMethod · 0.95
safe_reprFunction · 0.85

Tested by 15

_test_set_comparisonsMethod · 0.76
test_0_field_compareMethod · 0.76
test_1_field_compareMethod · 0.76
check_decodeMethod · 0.64
test_cache_boundedMethod · 0.64
test_calcsizeMethod · 0.64
test_language_versionMethod · 0.64
test_len_raceMethod · 0.64
test_cmp_to_keyMethod · 0.64