userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
plugin_legacy.py
1
import
asyncio
2
3
import
pytest
4
5
6
def
pytest_configure(config):
7
# Force default asyncio mode
8
config.option.asyncio_mode =
'auto'
9
10
11
@pytest.fixture(scope='session')
12
def
event_loop():
13
"""
14
Overrides pytest-asyncio internal `event_loop` fixture. Should not be
15
used explicitly.
16
17
Required for compatibility with pytest-asyncio 0.21.x
18
19
@ingroup userver_testsuite_fixtures
20
Part of the [yandex-taxi-testsuite](https://github.com/yandex/yandex-taxi-testsuite/blob/develop/testsuite/plugins/asyncio/plugin_legacy.py#L12)
21
"""
22
loop = asyncio.new_event_loop()
23
asyncio.set_event_loop(loop)
24
yield
loop
25
loop.close()
en
testsuite
plugins
asyncio
plugin_legacy.py
Generated on
for userver by
Doxygen
1.17.0