@@ -117,6 +117,8 @@ def run_embedded_interpreter(self, *args, env=None,
117
117
p .terminate ()
118
118
p .wait ()
119
119
raise
120
+ if returncode is None :
121
+ returncode = 1 if p .returncode == 0 else p .returncode
120
122
if p .returncode != returncode and support .verbose :
121
123
print (f"--- { cmd } failed ---" )
122
124
print (f"stdout:\n { out } " )
@@ -231,8 +233,8 @@ def test_replace_main_tstate(self):
231
233
with self .subTest (reuse = reuse , exec = False ):
232
234
self .run_embedded_interpreter (
233
235
'test_replace_main_tstate' ,
234
- # At the moment, this actually succeeds on all platforms .
235
- returncode = 0 ,
236
+ # At the moment, this fails because main_tstate gets broken .
237
+ returncode = None ,
236
238
)
237
239
with self .subTest (reuse = reuse , exec = True ):
238
240
out , _ = self .run_embedded_interpreter (
@@ -248,7 +250,7 @@ def test_fini_in_subthread(self):
248
250
'test_fini_in_subthread' ,
249
251
# At the moment, this actually succeeds on all platforms,
250
252
# except for Windows (STATUS_ACCESS_VIOLATION).
251
- returncode = 0xC0000005 if MS_WINDOWS else 0 ,
253
+ returncode = None if MS_WINDOWS else 0 ,
252
254
)
253
255
254
256
def test_fini_in_main_thread_with_other_tstate (self ):
0 commit comments