This commit is contained in:
Benjamin Peterson 2012-04-17 19:54:35 -04:00
commit 2a1fdc4c76
3 changed files with 13 additions and 1 deletions

View file

@ -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)