make tests dependent on uvloop
This commit is contained in:
parent
757974714e
commit
1af16836d4
|
@ -26,8 +26,13 @@ def test_create_asyncio_server(app):
|
||||||
asyncio_srv_coro = app.create_server(
|
asyncio_srv_coro = app.create_server(
|
||||||
return_asyncio_server=True)
|
return_asyncio_server=True)
|
||||||
assert isawaitable(asyncio_srv_coro)
|
assert isawaitable(asyncio_srv_coro)
|
||||||
srv = loop.run_until_complete(asyncio_srv_coro)
|
|
||||||
assert srv.is_serving() is True
|
try:
|
||||||
|
import uvloop
|
||||||
|
except ImportError:
|
||||||
|
# this test is valid only for sanic + asyncio setup
|
||||||
|
srv = loop.run_until_complete(asyncio_srv_coro)
|
||||||
|
assert srv.is_serving() is True
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skipif(sys.version_info < (3, 7),
|
@pytest.mark.skipif(sys.version_info < (3, 7),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user