summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2015-05-09 04:23:41 (GMT)
committerBenjamin Peterson <benjamin@python.org>2015-05-09 04:23:41 (GMT)
commit72c0141f03f723fe5269cb9cdcb1541a4c6811e8 (patch)
tree45e30a07f651a09a4aefdbd1e5db8488f29a1f98 /Lib
parent36691efe7b00776f4c14247a1a161a1d9ed6b600 (diff)
downloadcpython-72c0141f03f723fe5269cb9cdcb1541a4c6811e8.zip
cpython-72c0141f03f723fe5269cb9cdcb1541a4c6811e8.tar.gz
cpython-72c0141f03f723fe5269cb9cdcb1541a4c6811e8.tar.bz2
ensure .keywords is always a dict
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_functools.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py
index c0a9a3b..7b3cb96 100644
--- a/Lib/test/test_functools.py
+++ b/Lib/test/test_functools.py
@@ -89,9 +89,11 @@ class TestPartial(unittest.TestCase):
# exercise special code paths for no keyword args in
# either the partial object or the caller
p = self.thetype(capture)
+ self.assertEqual(p.keywords, {})
self.assertEqual(p(), ((), {}))
self.assertEqual(p(a=1), ((), {'a':1}))
p = self.thetype(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