File tree Expand file tree Collapse file tree 1 file changed +6
-13
lines changed
Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -1127,30 +1127,23 @@ def test_something(self):
11271127
11281128 def test_do_not_cleanup_type_subclasses_before_finalization (self ):
11291129 # https://github.com/python/cpython/issues/135552
1130- code = textwrap . dedent ( """
1130+ code = """
11311131 class BaseNode:
11321132 def __del__(self):
11331133 BaseNode.next = BaseNode.next.next
1134+ BaseNode.next.next
11341135
11351136 class Node(BaseNode):
11361137 pass
11371138
11381139 BaseNode.next = Node()
11391140 BaseNode.next.next = Node()
1140- """ )
1141- assert_python_ok ("-c" , code )
1141+ """
1142+ assert_python_ok ("-c" , textwrap . dedent ( code ) )
11421143
1143- code_inside_function = textwrap .dedent ("""
1144+ code_inside_function = textwrap .dedent (F """
11441145 def test():
1145- class BaseNode:
1146- def __del__(self):
1147- BaseNode.next = BaseNode.next.next
1148-
1149- class Node(BaseNode):
1150- pass
1151-
1152- BaseNode.next = Node()
1153- BaseNode.next.next = Node()
1146+ { textwrap .indent (code , ' ' )}
11541147
11551148 test()
11561149 """ )
You can’t perform that action at this time.
0 commit comments