@@ -214,13 +214,15 @@ def test_strip_exc_timestamps_function(self):
214214 for mode in ("us" , "ns" , "iso" ):
215215 with self .subTest (mode ):
216216 result = script_helper .assert_python_failure (
217- "-X" , f"traceback_timestamps={ mode } " , self .script_strip_path
217+ "-X" , f"traceback_timestamps={ mode } " ,
218+ "-X" , "utf8=1" , self .script_strip_path
218219 )
219220 output = result .out .decode () + result .err .decode ()
220221
221222 # call strip_exc_timestamps in a process using the same mode as what generated our output.
222223 result = script_helper .assert_python_ok (
223- "-X" , f"traceback_timestamps={ mode } " , self .script_strip_path , output
224+ "-X" , f"traceback_timestamps={ mode } " ,
225+ "-X" , "utf8=1" , self .script_strip_path , output
224226 )
225227 stripped_output = result .out .decode () + result .err .decode ()
226228
@@ -234,13 +236,15 @@ def test_strip_exc_timestamps_with_disabled_timestamps(self):
234236 """Test the strip_exc_timestamps function when timestamps are disabled"""
235237 # Run with timestamps disabled
236238 result = script_helper .assert_python_failure (
237- "-X" , "traceback_timestamps=0" , self .script_strip_path
239+ "-X" , "traceback_timestamps=0" ,
240+ "-X" , "utf8=1" , self .script_strip_path
238241 )
239242 output = result .out .decode () + result .err .decode ()
240243
241244 # call strip_exc_timestamps in a process using the same mode as what generated our output.
242245 result = script_helper .assert_python_ok (
243- "-X" , "traceback_timestamps=0" , self .script_strip_path , output
246+ "-X" , "traceback_timestamps=0" ,
247+ "-X" , "utf8=1" , self .script_strip_path , output
244248 )
245249 stripped_output = result .out .decode () + result .err .decode ()
246250
0 commit comments