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

Method assertGreater

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

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."""
1307 if not a > b:
1308 standardMsg = '%s not greater than %s' % (safe_repr(a), safe_repr(b))
1309 self.fail(self._formatMessage(msg, standardMsg))
1310
1311 def assertGreaterEqual(self, a, b, msg=None):
1312 """Just like self.assertTrue(a >= b), but with a nicer default message."""

Callers 15

_test_set_comparisonsMethod · 0.95
test_1_field_compareMethod · 0.95
assert_exc_stringMethod · 0.80
test_cache_exhaustionMethod · 0.80
test_context_managerMethod · 0.80
test_get_countMethod · 0.80
test_get_statsMethod · 0.80
test_freezeMethod · 0.80

Calls 3

failMethod · 0.95
_formatMessageMethod · 0.95
safe_reprFunction · 0.85

Tested by 15

_test_set_comparisonsMethod · 0.76
test_1_field_compareMethod · 0.76
assert_exc_stringMethod · 0.64
test_cache_exhaustionMethod · 0.64
test_context_managerMethod · 0.64
test_get_countMethod · 0.64
test_get_statsMethod · 0.64
test_freezeMethod · 0.64