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

Method assert_lt_subtest

Lib/test/test_compare.py:295–303  ·  view source on GitHub ↗
(self, a, b, comp, a_meth, b_meth)

Source from the content-addressed store, hash-verified

293 self.assertEqual(b != a, a is not b)
294
295 def assert_lt_subtest(self, a, b, comp, a_meth, b_meth):
296 if a_meth is None or "lt" in a_meth or "gt" in b_meth:
297 self.assertEqual(a < b, comp < 0)
298 self.assertEqual(b > a, comp < 0)
299 else:
300 with self.assertRaisesRegex(TypeError, "not supported"):
301 a < b
302 with self.assertRaisesRegex(TypeError, "not supported"):
303 b > a
304
305 def assert_le_subtest(self, a, b, comp, a_meth, b_meth):
306 if a_meth is None or "le" in a_meth or "ge" in b_meth:

Callers 1

assert_total_orderMethod · 0.95

Calls 2

assertRaisesRegexMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected