diff options
author | Barry Warsaw <barry@python.org> | 2008-11-20 20:01:57 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2008-11-20 20:01:57 (GMT) |
commit | 91cc8fb92b5d59d26cfca0167b32f6f25b453849 (patch) | |
tree | 4d63b6dcf6ffb33332ccad8cdb1a4d5fcb1459f6 /Lib | |
parent | 2d1ca2dbabde2ed69e06b50ddb2e87b12958d696 (diff) | |
download | cpython-91cc8fb92b5d59d26cfca0167b32f6f25b453849.zip cpython-91cc8fb92b5d59d26cfca0167b32f6f25b453849.tar.gz cpython-91cc8fb92b5d59d26cfca0167b32f6f25b453849.tar.bz2 |
Fix for bug 4360 "SystemError when method has both super() & closure". Patch
by amaury.forgeotdarc and reviewed by brett.cannon.
Also add release notes about the known problems with the email package.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_super.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_super.py b/Lib/test/test_super.py index 5594b11..5287402 100644 --- a/Lib/test/test_super.py +++ b/Lib/test/test_super.py @@ -70,6 +70,17 @@ class TestSuper(unittest.TestCase): e = E() self.assertEqual(e.cm(), (e, (E, (E, (E, 'A'), 'B'), 'C'), 'D')) + def testSuperWithClosure(self): + # Issue4360: super() did not work in a function that + # contains a closure + class E(A): + def f(self): + def nested(): + self + return super().f() + 'E' + + self.assertEqual(E().f(), 'AE') + def test_main(): support.run_unittest(TestSuper) |