From f43c3ed2b01ada6fbf6c25b3455b998ec7e07a49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ondrej=20Mosn=C3=A1=C4=8Dek?= Date: Fri, 12 Dec 2025 14:43:27 +0100 Subject: [PATCH] fix: use correct python command name in test_stdio.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some platforms (e.g. Fedora) don't provide an unversioned `python` binary. In such case `tests/client/test_stdio.py` fails when it tries to call it. Use `sys.executable` instead, which works reliably. Signed-off-by: Ondrej Mosnáček --- tests/client/test_stdio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/client/test_stdio.py b/tests/client/test_stdio.py index ce6c85962d..ba58da7321 100644 --- a/tests/client/test_stdio.py +++ b/tests/client/test_stdio.py @@ -69,7 +69,7 @@ async def test_stdio_client(): @pytest.mark.anyio async def test_stdio_client_bad_path(): """Check that the connection doesn't hang if process errors.""" - server_params = StdioServerParameters(command="python", args=["-c", "non-existent-file.py"]) + server_params = StdioServerParameters(command=sys.executable, args=["-c", "non-existent-file.py"]) async with stdio_client(server_params) as (read_stream, write_stream): async with ClientSession(read_stream, write_stream) as session: # The session should raise an error when the connection closes