mirror of
https://github.com/python/cpython.git
synced 2025-08-24 18:55:00 +00:00
don't rely on the order of module clearing
This commit is contained in:
parent
9769eb063c
commit
34b345b888
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ class ModuleTests(unittest.TestCase):
|
||||||
m = ModuleType("foo")
|
m = ModuleType("foo")
|
||||||
m.destroyed = destroyed
|
m.destroyed = destroyed
|
||||||
s = """class A:
|
s = """class A:
|
||||||
def __del__(self):
|
def __del__(self, destroyed=destroyed):
|
||||||
destroyed.append(1)
|
destroyed.append(1)
|
||||||
a = A()"""
|
a = A()"""
|
||||||
exec(s, m.__dict__)
|
exec(s, m.__dict__)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue