File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1- from typing import Any
1+ from typing import Any , cast
22
33import anyio
44import pytest
@@ -775,13 +775,13 @@ async def test_initialize_without_context_manager_raises_error():
775775 """
776776 Test that calling initialize() without entering the context manager raises RuntimeError.
777777 """
778- # Create dummy streams for session initialization
779- read_stream , write_stream = anyio .create_memory_object_stream (0 )
778+ send_stream , receive_stream = anyio .create_memory_object_stream [Any ](0 )
780779
781- async with read_stream , write_stream :
782- # Instantiate the session object directly
780+ read_stream = cast (Any , receive_stream )
781+ write_stream = cast (Any , send_stream )
782+
783+ async with send_stream , receive_stream :
783784 session = ClientSession (read_stream , write_stream )
784785
785- # Verify that calling initialize() raises a RuntimeError
786786 with pytest .raises (RuntimeError , match = "must be used within" ):
787787 await session .initialize ()
You can’t perform that action at this time.
0 commit comments