summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_keywordonlyarg.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_keywordonlyarg.py')
-rw-r--r--Lib/test/test_keywordonlyarg.py4
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)