Use the ProactorEventLoop on Windows.

pull/1782/head
grossmj 4 years ago
parent d3ea67da24
commit 1d4c3a164d

@ -21,6 +21,12 @@ from .handlers.api.base import Query
sys._called_from_test = True
sys.original_platform = sys.platform
if sys.platform.startswith("win"):
import asyncio
# use the Proactor event loop on Windows
loop = asyncio.ProactorEventLoop()
asyncio.set_event_loop(loop)
@pytest.fixture(scope='function')
async def http_client(aiohttp_client):

@ -70,7 +70,7 @@ async def test_web_ui(http_client, tmpdir):
f.write('world')
response = await http_client.get('/static/web-ui/testing.txt')
assert response.status == 200
os.remove(get_static('web-ui/testing.txt'))
os.remove(tmpfile)
async def test_web_ui_not_found(http_client, tmpdir):

Loading…
Cancel
Save