diff options
author | Benjamin Peterson <benjamin@python.org> | 2013-02-10 14:48:22 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2013-02-10 14:48:22 (GMT) |
commit | 419d9a83d5688940b3dbb410029080ad7f2f71a8 (patch) | |
tree | 2608b28d9ba829e1c533a27bfa645ba94f478291 /Lib/test/test_keywordonlyarg.py | |
parent | 8b466c99329c0d422a48acfae0c20ec1e76ef314 (diff) | |
download | cpython-419d9a83d5688940b3dbb410029080ad7f2f71a8.zip cpython-419d9a83d5688940b3dbb410029080ad7f2f71a8.tar.gz cpython-419d9a83d5688940b3dbb410029080ad7f2f71a8.tar.bz2 |
evaluate lambda keyword-only defaults after positional defaults (#16967 again)
Diffstat (limited to 'Lib/test/test_keywordonlyarg.py')
-rw-r--r-- | Lib/test/test_keywordonlyarg.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_keywordonlyarg.py b/Lib/test/test_keywordonlyarg.py index 7aabdfc..f0580d3 100644 --- a/Lib/test/test_keywordonlyarg.py +++ b/Lib/test/test_keywordonlyarg.py @@ -183,6 +183,10 @@ class KeywordOnlyArgTestCase(unittest.TestCase): def f(v=a, x=b, *, y=c, z=d): pass self.assertEqual(str(err.exception), "global name 'b' is not defined") + with self.assertRaises(NameError) as err: + f = lambda v=a, x=b, *, y=c, z=d: None + self.assertEqual(str(err.exception), "global name 'b' is not defined") + def test_main(): run_unittest(KeywordOnlyArgTestCase) |