AsyncSession cannot be created global since it will create a different loop from pytest-asyncio.
(event_loop)
| 21 | |
| 22 | @pytest.fixture |
| 23 | def 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 | |
| 34 | def count_chromium_process(): |
no test coverage detected
searching dependent graphs…