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

Method test_arg_combinations

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

Source from the content-addressed store, hash-verified

121 self.assertEqual(p(), ((), {'a': 3}))
122
123 def test_arg_combinations(self):
124 # exercise special code paths for zero args in either partial
125 # object or the caller
126 p = self.partial(capture)
127 self.assertEqual(p(), ((), {}))
128 self.assertEqual(p(1,2), ((1,2), {}))
129 p = self.partial(capture, 1, 2)
130 self.assertEqual(p(), ((1,2), {}))
131 self.assertEqual(p(3,4), ((1,2,3,4), {}))
132
133 def test_kw_combinations(self):
134 # exercise special code paths for no keyword args in

Callers

nothing calls this directly

Calls 3

partialMethod · 0.80
pFunction · 0.50
assertEqualMethod · 0.45

Tested by

no test coverage detected