Jeremiah Lowin commited on
Commit
d37ad3f
·
unverified ·
2 Parent(s): dbe74ca1bee8be

Merge branch 'main' into sse-inference

Browse files
tests/client/test_client.py CHANGED
@@ -515,6 +515,10 @@ class TestErrorHandling:
515
  assert "This is a resource error (xyz)" in str(excinfo.value)
516
 
517
 
 
 
 
 
518
  class TestTimeout:
519
  async def test_timeout(self, fastmcp_server: FastMCP):
520
  async with Client(
 
515
  assert "This is a resource error (xyz)" in str(excinfo.value)
516
 
517
 
518
+ @pytest.mark.skipif(
519
+ sys.platform == "win32",
520
+ reason="Timeout tests are flaky on Windows. Timeouts *are* supported but the tests are unreliable.",
521
+ )
522
  class TestTimeout:
523
  async def test_timeout(self, fastmcp_server: FastMCP):
524
  async with Client(
tests/client/test_sse.py CHANGED
@@ -136,11 +136,11 @@ async def test_nested_sse_server_resolves_correctly():
136
  assert result is True
137
 
138
 
 
 
 
 
139
  class TestTimeout:
140
- @pytest.mark.skipif(
141
- sys.platform == "win32",
142
- reason="This test is flaky on Windows. Sometimes the client timeout is respected and sometimes it is not.",
143
- )
144
  async def test_timeout(self, sse_server: str):
145
  with pytest.raises(
146
  McpError,
@@ -167,10 +167,6 @@ class TestTimeout:
167
  with pytest.raises(McpError, match="Timed out"):
168
  await client.call_tool("sleep", {"seconds": 0.1}, timeout=0.01)
169
 
170
- @pytest.mark.skipif(
171
- sys.platform == "win32",
172
- reason="This test is flaky on Windows. Sometimes the client timeout is respected and sometimes it is not.",
173
- )
174
  async def test_timeout_client_timeout_does_not_override_tool_call_timeout_if_lower(
175
  self, sse_server: str
176
  ):
 
136
  assert result is True
137
 
138
 
139
+ @pytest.mark.skipif(
140
+ sys.platform == "win32",
141
+ reason="Timeout tests are flaky on Windows. Timeouts *are* supported but the tests are unreliable.",
142
+ )
143
  class TestTimeout:
 
 
 
 
144
  async def test_timeout(self, sse_server: str):
145
  with pytest.raises(
146
  McpError,
 
167
  with pytest.raises(McpError, match="Timed out"):
168
  await client.call_tool("sleep", {"seconds": 0.1}, timeout=0.01)
169
 
 
 
 
 
170
  async def test_timeout_client_timeout_does_not_override_tool_call_timeout_if_lower(
171
  self, sse_server: str
172
  ):
tests/client/test_streamable_http.py CHANGED
@@ -149,6 +149,10 @@ async def test_nested_streamable_http_server_resolves_correctly():
149
  assert result is True
150
 
151
 
 
 
 
 
152
  class TestTimeout:
153
  async def test_timeout(self, streamable_http_server: str):
154
  # note this transport behaves differently than others and raises
 
149
  assert result is True
150
 
151
 
152
+ @pytest.mark.skipif(
153
+ sys.platform == "win32",
154
+ reason="Timeout tests are flaky on Windows. Timeouts *are* supported but the tests are unreliable.",
155
+ )
156
  class TestTimeout:
157
  async def test_timeout(self, streamable_http_server: str):
158
  # note this transport behaves differently than others and raises