From 06a71589fa45a0eb20875eb2f61ce06b4c0bf383 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Tue, 18 Nov 2025 16:38:04 +0100 Subject: [PATCH] gh-135953: Avoid BytesWarning when sampling profiler tests fail With `-bb`, this failed on BytesWarning: str() on a bytes instance --- Lib/test/test_profiling/test_sampling_profiler/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_profiling/test_sampling_profiler/helpers.py b/Lib/test/test_profiling/test_sampling_profiler/helpers.py index abd5a7377ad68e..f1c01afd0fa555 100644 --- a/Lib/test/test_profiling/test_sampling_profiler/helpers.py +++ b/Lib/test/test_profiling/test_sampling_profiler/helpers.py @@ -83,7 +83,7 @@ def test_subprocess(script): 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)