MCPcopy Create free account
hub / github.com/IBM/mcp-cli / test_get_timeout_from_env

Method test_get_timeout_from_env

tests/config/test_runtime.py:86–92  ·  view source on GitHub ↗

Test getting timeout from environment variable.

(self, base_config, monkeypatch)

Source from the content-addressed store, hash-verified

84 assert TimeoutType.STREAMING_CHUNK in rc._timeout_cache
85
86 def test_get_timeout_from_env(self, base_config, monkeypatch):
87 """Test getting timeout from environment variable."""
88 monkeypatch.setenv("MCP_STREAMING_CHUNK_TIMEOUT", "99.0")
89
90 rc = RuntimeConfig(base_config)
91 timeout = rc.get_timeout(TimeoutType.STREAMING_CHUNK)
92 assert timeout == 99.0
93
94 def test_get_timeout_from_tool_timeout_env(self, base_config, monkeypatch):
95 """Test getting timeout from MCP_TOOL_TIMEOUT env var."""

Callers

nothing calls this directly

Calls 2

get_timeoutMethod · 0.95
RuntimeConfigClass · 0.90

Tested by

no test coverage detected