summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_keywordonlyarg.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-12-08 22:17:26 (GMT)
committerChristian Heimes <christian@cheimes.de>2007-12-08 22:17:26 (GMT)
commit0da5bd6ee1b6a0e6f9397f43dab68ba098b04b58 (patch)
tree9905c8fc656abcc3a0d74f3bfe452b0f225d9ca9 /Lib/test/test_keywordonlyarg.py
parentbc8734174a0cd6513e55627464038aed22b3c32c (diff)
downloadcpython-0da5bd6ee1b6a0e6f9397f43dab68ba098b04b58.zip
cpython-0da5bd6ee1b6a0e6f9397f43dab68ba098b04b58.tar.gz
cpython-0da5bd6ee1b6a0e6f9397f43dab68ba098b04b58.tar.bz2
Added two tests for f(*, **kw) syntax
Diffstat (limited to 'Lib/test/test_keywordonlyarg.py')
-rw-r--r--Lib/test/test_keywordonlyarg.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_keywordonlyarg.py b/Lib/test/test_keywordonlyarg.py
index fc67c98..124257e 100644
--- a/Lib/test/test_keywordonlyarg.py
+++ b/Lib/test/test_keywordonlyarg.py
@@ -144,6 +144,13 @@ class KeywordOnlyArgTestCase(unittest.TestCase):
except TypeError:
pass
+ def test_doublestar_only(self):
+ def f(*, **kw):
+ return kw
+
+ self.assertEqual(f(), {})
+ self.assertEqual(f(k1=1, k2=2), {'k1' : 1, 'k2' : 2})
+
def test_main():
run_unittest(KeywordOnlyArgTestCase)