diff --git a/tests/client/test_stdio.py b/tests/client/test_stdio.py index ce6c85962..ba58da732 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