fix: use correct python command name in test_stdio.py (#1782)
Some checks failed
Main branch checks / checks (push) Has been cancelled

Signed-off-by: Ondrej Mosnáček <omosnacek@gmail.com>
This commit is contained in:
Ondrej Mosnáček 2025-12-12 15:02:38 +01:00 • committed by GitHub
commit 65b36de4eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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