Skip to content

Commit 892a085

Browse files
committed
Fix test case.
1 parent 079f186 commit 892a085

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Lib/test/test_faulthandler.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,16 +122,15 @@ def check_error(self, code, lineno, fatal_error, *,
122122
regex.append(fr'{header} \(most recent call first\):')
123123
if garbage_collecting:
124124
regex.append(' Garbage-collecting')
125-
regex.append(fr' File "<string>", line {lineno} in {function}')
126-
if c_stack:
127-
regex.append("Current thread's C stack (most recent call first):")
128-
regex.append(r" (\/.+\(\+.+\) \[0x[0-9a-f]+\])|(<.+>)")
129125
if support.Py_GIL_DISABLED and py_fatal_error and not know_current_thread:
130126
regex.append(" <tstate is freed>")
131127
else:
132128
if garbage_collecting and not all_threads_disabled:
133129
regex.append(' Garbage-collecting')
134130
regex.append(fr' File "<string>", line {lineno} in {function}')
131+
if c_stack:
132+
regex.append("Current thread's C stack (most recent call first):")
133+
regex.append(r" (\/.+\(\+.+\) \[0x[0-9a-f]+\])|(<.+>)")
135134
regex = '\n'.join(regex)
136135

137136
if other_regex:

0 commit comments

Comments
 (0)