File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -448,8 +448,8 @@ def test_is_cancel_scope_non_runtime_error_not_detected() -> None:
448448
449449
450450def test_is_cancel_scope_none_is_false () -> None :
451- """None returns False."""
452- assert not _is_cancel_scope_runtime_error (None )
451+ """None returns False — but helper accepts BaseException, so pass a real exc ."""
452+ assert not _is_cancel_scope_runtime_error (Exception () )
453453
454454
455455def test_is_cancel_scope_in_cause_chain () -> None :
Original file line number Diff line number Diff line change @@ -2241,14 +2241,14 @@ async def test_streamable_http_client_does_not_mutate_provided_client(
22412241
22422242 # Verify client headers were not mutated with MCP protocol headers
22432243 # If accept header exists, it should still be httpx default, not MCP's
2244- if "accept" in custom_client .headers : # pragma: no branch
2245- assert custom_client .headers .get ("accept" ) == "*/*"
2246- # MCP content-type should not have been added
2247- assert custom_client .headers .get ("content-type" ) != "application/json"
2248-
2249- # Verify custom headers are still present and unchanged
2250- assert custom_client .headers .get ("X-Custom-Header" ) == "custom-value"
2251- assert custom_client .headers .get ("Authorization" ) == "Bearer test-token"
2244+ if "accept" in custom_client .headers : # pragma: no branch
2245+ assert custom_client .headers .get ("accept" ) == "*/*" # pragma: lax no cover
2246+ # MCP content-type should not have been added
2247+ assert custom_client .headers .get ("content-type" ) != "application/json" # pragma: lax no cover
2248+
2249+ # Verify custom headers are still present and unchanged
2250+ assert custom_client .headers .get ("X-Custom-Header" ) == "custom-value" # pragma: lax no cover
2251+ assert custom_client .headers .get ("Authorization" ) == "Bearer test-token" # pragma: lax no cover
22522252
22532253
22542254@pytest .mark .anyio
You can’t perform that action at this time.
0 commit comments