Skip to content

Commit b1e90b2

Browse files
fix: relax sum > 0 to sum >= 0 for Windows timer resolution
time.monotonic() on Windows can have low enough resolution that fast in-memory calls measure as 0.0s. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
1 parent 4107e8c commit b1e90b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/shared/test_otel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def greet(name: str) -> str:
6363
assert tools_call_point["attributes"]["gen_ai.operation.name"] == "execute_tool"
6464
assert tools_call_point["attributes"]["mcp.protocol.version"] == "2025-11-25"
6565
assert tools_call_point["count"] == 1
66-
assert tools_call_point["sum"] > 0
66+
assert tools_call_point["sum"] >= 0
6767

6868
# tools/list is also called during initialization
6969
assert any(p["attributes"]["mcp.method.name"] == "tools/list" for p in op_points)
@@ -74,7 +74,7 @@ def greet(name: str) -> str:
7474
assert session_point["attributes"]["mcp.protocol.version"] == "2025-11-25"
7575
assert "error.type" not in session_point["attributes"]
7676
assert session_point["count"] == 1
77-
assert session_point["sum"] > 0
77+
assert session_point["sum"] >= 0
7878

7979

8080
@pytest.mark.filterwarnings("ignore::RuntimeWarning")

0 commit comments

Comments
 (0)