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

Method test_positional

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

Source from the content-addressed store, hash-verified

145 self.assertEqual(p(a=3, b=2), ((), {'a':3, 'b':2}))
146
147 def test_positional(self):
148 # make sure positional arguments are captured correctly
149 for args in [(), (0,), (0,1), (0,1,2), (0,1,2,3)]:
150 p = self.partial(capture, *args)
151 expected = args + ('x',)
152 got, empty = p('x')
153 self.assertTrue(expected == got and empty == {})
154
155 def test_keyword(self):
156 # make sure keyword arguments are captured correctly

Callers

nothing calls this directly

Calls 3

partialMethod · 0.80
assertTrueMethod · 0.80
pFunction · 0.50

Tested by

no test coverage detected