Skip to content

Commit 96ec9ea

Browse files
cliffhallclaude
andcommitted
test(time): use SDK 1.x's McpError in the #5060 test
The cherry-pick of d52c223 (#5077) comes from the SDK v2 tree, where the exception is MCPError. On v2/release/1.0.0 the server raises mcp.shared.exceptions.McpError, already imported by this test module. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: cliffhall <[email protected]>
1 parent aa870b4 commit 96ec9ea

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/time/tests/test_server.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ def test_get_zoneinfo_rejects_a_key_the_tz_database_does_not_list():
539539
without_warsaw = known_timezones() - {"Europe/Warsaw"}
540540
with patch("mcp_server_time.server.known_timezones", return_value=without_warsaw):
541541
with pytest.raises(
542-
MCPError,
542+
McpError,
543543
match="Invalid timezone: 'No time zone found with key Europe/Warsaw'",
544544
):
545545
get_zoneinfo("Europe/Warsaw")

0 commit comments

Comments
 (0)