summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_module/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_module/__init__.py')
-rw-r--r--Lib/test/test_module/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_module/__init__.py b/Lib/test/test_module/__init__.py
index 98d1cbe..952ba43 100644
--- a/Lib/test/test_module/__init__.py
+++ b/Lib/test/test_module/__init__.py
@@ -4,6 +4,7 @@ import unittest
import weakref
from test.support import gc_collect
from test.support import import_helper
+from test.support import suppress_immortalization
from test.support.script_helper import assert_python_ok
import sys
@@ -103,6 +104,7 @@ class ModuleTests(unittest.TestCase):
gc_collect()
self.assertEqual(f().__dict__["bar"], 4)
+ @suppress_immortalization()
def test_clear_dict_in_ref_cycle(self):
destroyed = []
m = ModuleType("foo")
@@ -118,6 +120,7 @@ a = A(destroyed)"""
gc_collect()
self.assertEqual(destroyed, [1])
+ @suppress_immortalization()
def test_weakref(self):
m = ModuleType("foo")
wr = weakref.ref(m)