mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2025-02-01 15:55:28 +00:00
fix windows tests failing due to tornado bug
This commit is contained in:
parent
83dac0e999
commit
e31f69ff4a
@ -5,4 +5,5 @@ if sys.platform == 'win32':
|
|||||||
# workaround for
|
# workaround for
|
||||||
# https://github.com/tornadoweb/tornado/issues/2751
|
# https://github.com/tornadoweb/tornado/issues/2751
|
||||||
# https://www.tornadoweb.org/en/stable/index.html#installation
|
# https://www.tornadoweb.org/en/stable/index.html#installation
|
||||||
|
# (copied multiple times in the codebase, please remove all occurrences)
|
||||||
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
|
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
|
||||||
|
@ -3,16 +3,25 @@ import logging
|
|||||||
from unittest import mock
|
from unittest import mock
|
||||||
import os
|
import os
|
||||||
import asyncio
|
import asyncio
|
||||||
|
import sys
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import tornado.testing
|
|
||||||
from tornado import httpclient
|
|
||||||
from tornado import websocket
|
|
||||||
|
|
||||||
from mitmproxy import options
|
if sys.platform == 'win32':
|
||||||
from mitmproxy.test import tflow
|
# workaround for
|
||||||
from mitmproxy.tools.web import app
|
# https://github.com/tornadoweb/tornado/issues/2751
|
||||||
from mitmproxy.tools.web import master as webmaster
|
# https://www.tornadoweb.org/en/stable/index.html#installation
|
||||||
|
# (copied multiple times in the codebase, please remove all occurrences)
|
||||||
|
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
|
||||||
|
|
||||||
|
import tornado.testing # noqa
|
||||||
|
from tornado import httpclient # noqa
|
||||||
|
from tornado import websocket # noqa
|
||||||
|
|
||||||
|
from mitmproxy import options # noqa
|
||||||
|
from mitmproxy.test import tflow # noqa
|
||||||
|
from mitmproxy.tools.web import app # noqa
|
||||||
|
from mitmproxy.tools.web import master as webmaster # noqa
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="module")
|
@pytest.fixture(scope="module")
|
||||||
|
Loading…
Reference in New Issue
Block a user