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

Method test_repr

Lib/test/test_collections.py:651–657  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

649 self.assertEqual(t.__getnewargs__(), values)
650
651 def test_repr(self):
652 A = namedtuple('A', 'x')
653 self.assertEqual(repr(A(1)), 'A(x=1)')
654 # repr should show the name of the subclass
655 class B(A):
656 pass
657 self.assertEqual(repr(B(1)), 'B(x=1)')
658
659 def test_keyword_only_arguments(self):
660 # See issue 25628

Callers

nothing calls this directly

Calls 4

namedtupleFunction · 0.90
AClass · 0.70
BClass · 0.70
assertEqualMethod · 0.45

Tested by

no test coverage detected