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

Method test_kwargs_copy

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

Source from the content-addressed store, hash-verified

112 self.assertEqual(d, {'a':3})
113
114 def test_kwargs_copy(self):
115 # Issue #29532: Altering a kwarg dictionary passed to a constructor
116 # should not affect a partial object after creation
117 d = {'a': 3}
118 p = self.partial(capture, **d)
119 self.assertEqual(p(), ((), {'a': 3}))
120 d['a'] = 5
121 self.assertEqual(p(), ((), {'a': 3}))
122
123 def test_arg_combinations(self):
124 # exercise special code paths for zero args in either partial

Callers

nothing calls this directly

Calls 3

partialMethod · 0.80
pFunction · 0.50
assertEqualMethod · 0.45

Tested by

no test coverage detected