MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_repr

Method test_repr

Lib/test/test_functools.py:717–727  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

715 method = functools.partialmethod(func=capture, a=1)
716
717 def test_repr(self):
718 self.assertEqual(repr(vars(self.A)['nothing']),
719 'functools.partialmethod({})'.format(capture))
720 self.assertEqual(repr(vars(self.A)['positional']),
721 'functools.partialmethod({}, 1)'.format(capture))
722 self.assertEqual(repr(vars(self.A)['keywords']),
723 'functools.partialmethod({}, a=2)'.format(capture))
724 self.assertEqual(repr(vars(self.A)['spec_keywords']),
725 'functools.partialmethod({}, self=1, func=2)'.format(capture))
726 self.assertEqual(repr(vars(self.A)['both']),
727 'functools.partialmethod({}, 3, b=4)'.format(capture))
728
729 def test_abstract(self):
730 class Abstract(abc.ABCMeta):

Callers

nothing calls this directly

Calls 4

reprFunction · 0.85
varsFunction · 0.85
assertEqualMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected