Use the ProactorEventLoop on Windows.

This commit is contained in:
grossmj committed 2020-06-16 14:08:17 +09:30
1 parent d3ea67da24
commit 1d4c3a164d
2 files changed
+7 -1

No files matched your search

+6
View File
@@ -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):
+1 -1
View File
@@ -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):