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

Method assert_eq_subtest

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

Source from the content-addressed store, hash-verified

277 # expect default behavior of object for a op b and b rop a.
278
279 def assert_eq_subtest(self, a, b, comp, a_meth, b_meth):
280 if a_meth is None or "eq" in a_meth or "eq" in b_meth:
281 self.assertEqual(a == b, comp == 0)
282 self.assertEqual(b == a, comp == 0)
283 else:
284 self.assertEqual(a == b, a is b)
285 self.assertEqual(b == a, a is b)
286
287 def assert_ne_subtest(self, a, b, comp, a_meth, b_meth):
288 if a_meth is None or not {"ne", "eq"}.isdisjoint(a_meth + b_meth):

Callers 1

assert_total_orderMethod · 0.95

Calls 1

assertEqualMethod · 0.45

Tested by

no test coverage detected