]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-135953: Avoid BytesWarning when sampling profiler tests fail (GH-141719)
authorPetr Viktorin <encukou@gmail.com>
Wed, 19 Nov 2025 13:43:42 +0000 (14:43 +0100)
committerGitHub <noreply@github.com>
Wed, 19 Nov 2025 13:43:42 +0000 (14:43 +0100)
With `-bb`, this failed on BytesWarning: str() on a bytes instance

Lib/test/test_profiling/test_sampling_profiler/helpers.py

index abd5a7377ad68e355e01d11d0005e5190c00816c..f1c01afd0fa555c9317e6578044c2218fab5aafa 100644 (file)
@@ -83,7 +83,7 @@ _test_sock.sendall(b"ready")
         response = client_socket.recv(1024)
         if response != b"ready":
             raise RuntimeError(
-                f"Unexpected response from subprocess: {response}"
+                f"Unexpected response from subprocess: {response!r}"
             )
 
         yield SubprocessInfo(proc, client_socket)