mirror of
https://github.com/python/cpython.git
synced 2025-08-20 00:32:12 +00:00
Fix a reference leak found by Georg, when compiling a class nested in another class.
Test is run with "regrtest.py -R:: test_compile" Backport of r62015
This commit is contained in:
parent
198e353735
commit
8432d86b9f
3 changed files with 8 additions and 0 deletions
|
@ -398,6 +398,10 @@ if 1:
|
|||
del d[..., ...]
|
||||
self.assertEqual((Ellipsis, Ellipsis) in d, False)
|
||||
|
||||
def test_nested_classes(self):
|
||||
# Verify that it does not leak
|
||||
compile("class A:\n class B: pass", 'tmp', 'exec')
|
||||
|
||||
def test_main():
|
||||
test_support.run_unittest(TestSpecifics)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue