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

Method test_positional_only

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

Source from the content-addressed store, hash-verified

742 self.assertFalse(getattr(func, '__isabstractmethod__', False))
743
744 def test_positional_only(self):
745 def f(a, b, /):
746 return a + b
747
748 p = functools.partial(f, 1)
749 self.assertEqual(p(2), f(1, 2))
750
751 def test_subclass_optimization(self):
752 class PartialMethodSubclass(functools.partialmethod):

Callers

nothing calls this directly

Calls 4

partialMethod · 0.80
fFunction · 0.70
pFunction · 0.50
assertEqualMethod · 0.45

Tested by

no test coverage detected