Skip to content

Commit 3e16e7d

Browse files
committed
Use tornado 5.0 and remove tests using wdom
1 parent d376c58 commit 3e16e7d

File tree

6 files changed

+3
-138
lines changed

6 files changed

+3
-138
lines changed

pyppeteer/util.py

-12
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,10 @@
1414
'check_chromium',
1515
'chromium_excutable',
1616
'download_chromium',
17-
'install_asyncio',
1817
'get_free_port',
1918
]
2019

2120

22-
def install_asyncio() -> None:
23-
"""Install tornado's loop to asyncio."""
24-
try:
25-
from tornado.ioloop import IOLoop
26-
from tornado.platform.asyncio import AsyncIOMainLoop
27-
if not IOLoop.initialized():
28-
AsyncIOMainLoop().install()
29-
except ImportError:
30-
pass
31-
32-
3321
def get_free_port() -> int:
3422
"""Get free port."""
3523
sock = socket.socket()

requirements-test.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
syncer
2-
tornado
3-
wdom
2+
tornado>=5

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
test_requirements = [
5050
'syncer',
51-
'tornado',
51+
'tornado>=5',
5252
'wdom',
5353
]
5454

tests/server.py

-2
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,6 @@ def get_application() -> web.Application:
115115

116116

117117
if __name__ == '__main__':
118-
from pyppeteer.util import install_asyncio
119-
install_asyncio()
120118
app = get_application()
121119
app.listen(9000)
122120
asyncio.get_event_loop().run_forever()

tests/test_pyppeteer.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,12 @@
2121
from pyppeteer.errors import ElementHandleError, NetworkError, PageError
2222
from pyppeteer.errors import TimeoutError, PyppeteerError
2323
from pyppeteer.launcher import connect
24-
from pyppeteer.util import install_asyncio, get_free_port
24+
from pyppeteer.util import get_free_port
2525
from server import get_application, BASE_HTML
2626

2727
DEFAULT_OPTIONS = {'args': ['--no-sandbox']}
2828

2929

30-
def setUpModule():
31-
install_asyncio()
32-
33-
3430
class TestLauncher(unittest.TestCase):
3531
@sync
3632
async def test_launch(self):

tests/test_wdom.py

-116
This file was deleted.

0 commit comments

Comments
 (0)