aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_weakref.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_weakref.py')
-rw-r--r--Lib/test/test_weakref.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_weakref.py b/Lib/test/test_weakref.py
index a2f5b9b2902..df90647baee 100644
--- a/Lib/test/test_weakref.py
+++ b/Lib/test/test_weakref.py
@@ -13,7 +13,7 @@ import random
import textwrap
from test import support
-from test.support import script_helper, ALWAYS_EQ
+from test.support import script_helper, ALWAYS_EQ, suppress_immortalization
from test.support import gc_collect
from test.support import import_helper
from test.support import threading_helper
@@ -651,6 +651,7 @@ class ReferencesTestCase(TestBase):
# deallocation of c2.
del c2
+ @suppress_immortalization()
def test_callback_in_cycle(self):
import gc
@@ -743,6 +744,7 @@ class ReferencesTestCase(TestBase):
del c1, c2, C, D
gc.collect()
+ @suppress_immortalization()
def test_callback_in_cycle_resurrection(self):
import gc
@@ -878,6 +880,7 @@ class ReferencesTestCase(TestBase):
# No exception should be raised here
gc.collect()
+ @suppress_immortalization()
def test_classes(self):
# Check that classes are weakrefable.
class A(object):