@@ -155,7 +155,7 @@ def _assert_ok(self, proc: subprocess.CompletedProcess[str]) -> None:
155155 def test_debug (self ) -> None :
156156 def check (proc : subprocess .CompletedProcess [str ]) -> None :
157157 self ._assert_ok (proc )
158- self .assertIn ( "JIT: cinderx/" , proc . stderr )
158+ self .assertRegex ( proc . stderr , r "JIT: cinderx[/\\]" )
159159
160160 self ._check_both_forms ("jit-debug" , "PYTHONJITDEBUG" , ["-c" , _HELLO ], check )
161161
@@ -256,7 +256,7 @@ def test_gdb_support(self) -> None:
256256 # GDB support also turns on JIT debug logging.
257257 def check (proc : subprocess .CompletedProcess [str ]) -> None :
258258 self ._assert_ok (proc )
259- self .assertIn ( "JIT: cinderx/" , proc . stderr )
259+ self .assertRegex ( proc . stderr , r "JIT: cinderx[/\\]" )
260260
261261 self ._check_both_forms (
262262 "jit-gdb-support" , "PYTHONJITGDBSUPPORT" , ["-c" , _HELLO ], check
@@ -265,7 +265,7 @@ def check(proc: subprocess.CompletedProcess[str]) -> None:
265265 def test_gdb_write_elf (self ) -> None :
266266 def check (proc : subprocess .CompletedProcess [str ]) -> None :
267267 self ._assert_ok (proc )
268- self .assertIn ( "JIT: cinderx/" , proc . stderr )
268+ self .assertRegex ( proc . stderr , r "JIT: cinderx[/\\]" )
269269
270270 self ._check_both_forms (
271271 "jit-gdb-write-elf" , "PYTHONJITGDBWRITEELF" , ["-c" , _HELLO ], check
@@ -298,7 +298,7 @@ def test_log_file(self) -> None:
298298 def check (proc : subprocess .CompletedProcess [str ]) -> None :
299299 self ._assert_ok (proc )
300300 self .assertEqual (proc .stderr , "" )
301- self .assertIn ( "JIT: cinderx/" , log_file . read_text () )
301+ self .assertRegex ( log_file . read_text (), r "JIT: cinderx[/\\]" )
302302 log_file .unlink ()
303303
304304 self ._check_both_forms (
0 commit comments