fix uvloop check

This commit is contained in:
Denis Makogon 2019-01-15 17:45:47 +02:00
parent f8f0241c27
commit b36bd21813

View File

@ -27,9 +27,10 @@ def test_app_loop_running(app):
assert response.text == "pass" assert response.text == "pass"
@pytest.mark.skipif(sys.version_info < (3, 7) and uvloop_installed(), @pytest.mark.skipif(sys.version_info < (3, 7),
reason="requires python3.7 or higher") reason="requires python3.7 or higher")
def test_create_asyncio_server(app): def test_create_asyncio_server(app):
if not uvloop_installed():
loop = asyncio.get_event_loop() loop = asyncio.get_event_loop()
asyncio_srv_coro = app.create_server( asyncio_srv_coro = app.create_server(
return_asyncio_server=True) return_asyncio_server=True)
@ -38,9 +39,10 @@ def test_create_asyncio_server(app):
assert srv.is_serving() is True assert srv.is_serving() is True
@pytest.mark.skipif(sys.version_info < (3, 7) and uvloop_installed(), @pytest.mark.skipif(sys.version_info < (3, 7),
reason="requires python3.7 or higher") reason="requires python3.7 or higher")
def test_asyncio_server_start_serving(app): def test_asyncio_server_start_serving(app):
if not uvloop_installed():
loop = asyncio.get_event_loop() loop = asyncio.get_event_loop()
asyncio_srv_coro = app.create_server( asyncio_srv_coro = app.create_server(
return_asyncio_server=True, return_asyncio_server=True,