MCPcopy
hub / github.com/psf/requests-html / async_get

Function async_get

tests/test_requests_html.py:23–31  ·  view source on GitHub ↗

AsyncSession cannot be created global since it will create a different loop from pytest-asyncio.

(event_loop)

Source from the content-addressed store, hash-verified

21
22@pytest.fixture
23def async_get(event_loop):
24 """ AsyncSession cannot be created global since it will create
25 a different loop from pytest-asyncio. """
26 async_session = AsyncHTMLSession()
27 async_session.mount('file://', FileAdapter())
28 path = os.path.sep.join((os.path.dirname(os.path.abspath(__file__)), 'python.html'))
29 url = 'file://{}'.format(path)
30
31 return partial(async_session.get, url)
32
33
34def count_chromium_process():

Callers 3

test_async_file_getFunction · 0.85
test_async_linksFunction · 0.85
test_async_renderFunction · 0.85

Calls 1

AsyncHTMLSessionClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…