mirror of
https://github.com/kennethreitz/requests-html.git
synced 2026-06-05 06:46:14 +00:00
Update deps, remove psutil
This commit is contained in:
@@ -17,12 +17,12 @@ pyppeteer = "*"
|
||||
twine = "*"
|
||||
requests-file = "*"
|
||||
pytest = "*"
|
||||
"e1839a8" = {path = ".", editable = true}
|
||||
e1839a8 = {path = ".",editable = true}
|
||||
sphinx = "*"
|
||||
mypy = "*"
|
||||
pytest-asyncio = "*"
|
||||
psutil = "*"
|
||||
white = "*"
|
||||
|
||||
[scripts]
|
||||
tests = "pytest -v -m ok"
|
||||
tests = "pytest -v -m 'not internet' "
|
||||
|
||||
|
||||
Generated
+466
-300
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@ from requests_html import HTMLSession, AsyncHTMLSession, HTMLResponse
|
||||
|
||||
session = HTMLSession()
|
||||
|
||||
|
||||
@pytest.mark.internet
|
||||
def test_pagination():
|
||||
pages = (
|
||||
'https://xkcd.com/1957/',
|
||||
@@ -15,7 +15,7 @@ def test_pagination():
|
||||
r = session.get(page)
|
||||
assert next(r.html)
|
||||
|
||||
|
||||
@pytest.mark.internet
|
||||
@pytest.mark.asyncio
|
||||
async def test_async_pagination(event_loop):
|
||||
asession = AsyncHTMLSession()
|
||||
@@ -29,7 +29,7 @@ async def test_async_pagination(event_loop):
|
||||
r = await asession.get(page)
|
||||
assert await r.html.__anext__()
|
||||
|
||||
|
||||
@pytest.mark.internet
|
||||
def test_async_run():
|
||||
asession = AsyncHTMLSession()
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ import os
|
||||
from functools import partial
|
||||
|
||||
import pytest
|
||||
import psutil
|
||||
from pyppeteer.browser import Browser
|
||||
from pyppeteer.page import Page
|
||||
from requests_html import HTMLSession, AsyncHTMLSession, HTML
|
||||
@@ -31,14 +30,6 @@ def async_get(event_loop):
|
||||
return partial(async_session.get, url)
|
||||
|
||||
|
||||
def count_chromium_process():
|
||||
process = 0
|
||||
for proc in psutil.process_iter(attrs=['name']):
|
||||
if proc.info["name"] == "Chromium":
|
||||
process += 1
|
||||
return process
|
||||
|
||||
|
||||
@pytest.mark.ok
|
||||
def test_file_get():
|
||||
r = get()
|
||||
|
||||
Reference in New Issue
Block a user