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

Method assert_roundtrip_equal

Lib/test/test_crossinterp.py:473–482  ·  view source on GitHub ↗
(self, values, *, mode=None, expecttype=None)

Source from the content-addressed store, hash-verified

471 self.assertIs(got, obj)
472
473 def assert_roundtrip_equal(self, values, *, mode=None, expecttype=None):
474 mode = self._resolve_mode(mode)
475 for obj in values:
476 with self.subTest(repr(obj)):
477 got = self._get_roundtrip(obj, mode)
478 if got is obj:
479 continue
480 self.assertIs(type(got),
481 type(obj) if expecttype is None else expecttype)
482 self.assert_equal_or_equalish(got, obj)
483
484 def assert_roundtrip_equal_not_identical(self, values, *,
485 mode=None, expecttype=None):

Calls 5

_resolve_modeMethod · 0.95
_get_roundtripMethod · 0.95
subTestMethod · 0.45
assertIsMethod · 0.45

Tested by

no test coverage detected