File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424)
2525
2626import pytest
27+ import sniffio
2728from outcome import Outcome
2829
2930import trio
@@ -223,7 +224,8 @@ async def trio_main(in_host: InHost) -> str:
223224
224225
225226def test_guest_mode_sniffio_integration () -> None :
226- from sniffio import current_async_library , thread_local as sniffio_library
227+ current_async_library = sniffio .current_async_library
228+ sniffio_library = sniffio .thread_local
227229
228230 async def trio_main (in_host : InHost ) -> str :
229231 async def synchronize () -> None :
@@ -626,8 +628,6 @@ async def trio_main(in_host: InHost) -> None:
626628
627629@restore_unraisablehook ()
628630def test_guest_mode_asyncgens () -> None :
629- import sniffio
630-
631631 record = set ()
632632
633633 async def agen (label : str ) -> AsyncGenerator [int , None ]:
@@ -661,8 +661,6 @@ async def trio_main() -> None:
661661
662662@restore_unraisablehook ()
663663def test_guest_mode_asyncgens_garbage_collection () -> None :
664- import sniffio
665-
666664 record : set [tuple [str , str , bool ]] = set ()
667665
668666 async def agen (label : str ) -> AsyncGenerator [int , None ]:
You can’t perform that action at this time.
0 commit comments