File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 24
24
)
25
25
26
26
import pytest
27
+ import sniffio
27
28
from outcome import Outcome
28
29
29
30
import trio
@@ -223,7 +224,8 @@ async def trio_main(in_host: InHost) -> str:
223
224
224
225
225
226
def 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
227
229
228
230
async def trio_main (in_host : InHost ) -> str :
229
231
async def synchronize () -> None :
@@ -626,8 +628,6 @@ async def trio_main(in_host: InHost) -> None:
626
628
627
629
@restore_unraisablehook ()
628
630
def test_guest_mode_asyncgens () -> None :
629
- import sniffio
630
-
631
631
record = set ()
632
632
633
633
async def agen (label : str ) -> AsyncGenerator [int , None ]:
@@ -661,8 +661,6 @@ async def trio_main() -> None:
661
661
662
662
@restore_unraisablehook ()
663
663
def test_guest_mode_asyncgens_garbage_collection () -> None :
664
- import sniffio
665
-
666
664
record : set [tuple [str , str , bool ]] = set ()
667
665
668
666
async def agen (label : str ) -> AsyncGenerator [int , None ]:
You can’t perform that action at this time.
0 commit comments