mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
ensure .keywords is always a dict
This commit is contained in:
parent
07abcf58d9
commit
65bcdd7195
3 changed files with 9 additions and 9 deletions
|
@ -77,9 +77,11 @@ class TestPartial:
|
|||
# exercise special code paths for no keyword args in
|
||||
# either the partial object or the caller
|
||||
p = self.partial(capture)
|
||||
self.assertEqual(p.keywords, {})
|
||||
self.assertEqual(p(), ((), {}))
|
||||
self.assertEqual(p(a=1), ((), {'a':1}))
|
||||
p = self.partial(capture, a=1)
|
||||
self.assertEqual(p.keywords, {'a':1})
|
||||
self.assertEqual(p(), ((), {'a':1}))
|
||||
self.assertEqual(p(b=2), ((), {'a':1, 'b':2}))
|
||||
# keyword args in the call override those in the partial object
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue