MCPcopy Create free account
hub / github.com/RustPython/RustPython / test_repr

Method test_repr

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected