make tests dependent on uvloop
This commit is contained in:
parent
757974714e
commit
1af16836d4
|
@ -26,6 +26,11 @@ 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)
|
||||||
|
|
||||||
|
try:
|
||||||
|
import uvloop
|
||||||
|
except ImportError:
|
||||||
|
# this test is valid only for sanic + asyncio setup
|
||||||
srv = loop.run_until_complete(asyncio_srv_coro)
|
srv = loop.run_until_complete(asyncio_srv_coro)
|
||||||
assert srv.is_serving() is True
|
assert srv.is_serving() is True
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user