File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
experimental/tasks/server Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -299,7 +299,9 @@ async def test_update_capabilities_partial_handlers() -> None:
299299 """Test that update_capabilities skips list/cancel when only tasks/get is registered."""
300300 server = Server ("test-partial" )
301301 # Access .experimental to create the ExperimentalHandlers instance
302- _ = server .experimental
302+ exp = server .experimental
303+ # Second access returns the same cached instance
304+ assert server .experimental is exp
303305
304306 async def noop_get (ctx : ServerRequestContext , params : GetTaskRequestParams ) -> GetTaskResult :
305307 raise NotImplementedError
Original file line number Diff line number Diff line change @@ -1412,10 +1412,9 @@ async def test_completion_decorator() -> None:
14121412 @mcp .completion ()
14131413 async def handle_completion (
14141414 ref : PromptReference , argument : CompletionArgument , context : CompletionContext | None
1415- ) -> Completion | None :
1416- if argument .name == "style" :
1417- return Completion (values = ["bold" , "italic" , "underline" ])
1418- return None
1415+ ) -> Completion :
1416+ assert argument .name == "style"
1417+ return Completion (values = ["bold" , "italic" , "underline" ])
14191418
14201419 async with Client (mcp ) as client :
14211420 ref = PromptReference (type = "ref/prompt" , name = "test" )
You can’t perform that action at this time.
0 commit comments