diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-04-17 23:53:21 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-04-17 23:53:21 (GMT) |
commit | 32c59b6fc1140486a9915876054365b40bd88da9 (patch) | |
tree | 19d1b96def03bb9975cc4e5166c31fa0d54821ff /Lib/test | |
parent | ab2d58eefa222cdc439bef8eb02b3620bc991164 (diff) | |
download | cpython-32c59b6fc1140486a9915876054365b40bd88da9.zip cpython-32c59b6fc1140486a9915876054365b40bd88da9.tar.gz cpython-32c59b6fc1140486a9915876054365b40bd88da9.tar.bz2 |
mangle keyword-only argname when loading defaults (closes #14607)
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_keywordonlyarg.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_keywordonlyarg.py b/Lib/test/test_keywordonlyarg.py index 3aebd68..108ed18 100644 --- a/Lib/test/test_keywordonlyarg.py +++ b/Lib/test/test_keywordonlyarg.py @@ -170,6 +170,12 @@ class KeywordOnlyArgTestCase(unittest.TestCase): # used to fail with a SystemError. lambda *, k1=unittest: None + def test_mangling(self): + class X: + def f(self, *, __a=42): + return __a + self.assertEqual(X().f(), 42) + def test_main(): run_unittest(KeywordOnlyArgTestCase) |