11import asyncio
22import inspect
33import os
4- import sys
54import time
65
76import pytest
@@ -18,7 +17,6 @@ def test_sync_methods():
1817 assert not inspect .iscoroutinefunction (inst .info )
1918
2019
21- @pytest .mark .skipif (fsspec .asyn .PY36 , reason = "missing asyncio features o py36" )
2220def test_interrupt ():
2321 loop = fsspec .asyn .get_loop ()
2422
@@ -46,32 +44,27 @@ async def _dummy_async_func(self):
4644 dummy_func = fsspec .asyn .sync_wrapper (_dummy_async_func )
4745
4846
49- @pytest .mark .skipif (sys .version_info < (3 , 7 ), reason = "no asyncio.run in <3.7" )
5047def test_sync_wrapper_timeout_on_less_than_expected_wait_time_not_finish_function ():
5148 test_obj = _DummyAsyncKlass ()
5249 with pytest .raises (fsspec .FSTimeoutError ):
5350 test_obj .dummy_func (timeout = 0.1 )
5451
5552
56- @pytest .mark .skipif (sys .version_info < (3 , 7 ), reason = "no asyncio.run in <3.7" )
5753def test_sync_wrapper_timeout_on_more_than_expected_wait_time_will_finish_function ():
5854 test_obj = _DummyAsyncKlass ()
5955 assert test_obj .dummy_func (timeout = 5 )
6056
6157
62- @pytest .mark .skipif (sys .version_info < (3 , 7 ), reason = "no asyncio.run in <3.7" )
6358def test_sync_wrapper_timeout_none_will_wait_func_finished ():
6459 test_obj = _DummyAsyncKlass ()
6560 assert test_obj .dummy_func (timeout = None )
6661
6762
68- @pytest .mark .skipif (sys .version_info < (3 , 7 ), reason = "no asyncio.run in <3.7" )
6963def test_sync_wrapper_treat_timeout_0_as_none ():
7064 test_obj = _DummyAsyncKlass ()
7165 assert test_obj .dummy_func (timeout = 0 )
7266
7367
74- @pytest .mark .skipif (sys .version_info < (3 , 7 ), reason = "no asyncio.run in <3.7" )
7568def test_run_coros_in_chunks (monkeypatch ):
7669 total_running = 0
7770
0 commit comments