File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 212
212
check_impl_detail , requires_debug_ranges ,
213
213
gc_collect , Py_GIL_DISABLED )
214
214
from test .support .script_helper import assert_python_ok
215
- from test .support import threading_helper , import_helper
215
+ from test .support import threading_helper , import_helper , refleak_helper
216
216
from test .support .bytecode_helper import instructions_with_positions
217
217
from opcode import opmap , opname
218
218
from _testcapi import code_offset_to_line
@@ -667,6 +667,11 @@ def func2():
667
667
668
668
@cpython_only
669
669
def test_unusual_constants (self ):
670
+ # We cannot use the @skipIf here because hunting_for_refleaks()
671
+ # is only true once we start executing the test.
672
+ if Py_GIL_DISABLED and refleak_helper .hunting_for_refleaks ():
673
+ raise unittest .SkipTest ("Immortalized objects trigger refleak detection" )
674
+
670
675
# gh-130851: Code objects constructed with constants that are not
671
676
# types generated by the bytecode compiler should not crash the
672
677
# interpreter.
You can’t perform that action at this time.
0 commit comments