mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-09-05 02:24:21 -05:00
* remove event_loop() fixtures * flake8 * flake8 * remove sys.exit() from daemon shutdown * bump full node test timeout. a lot... to see. * fixup some tests * back to module scope event loop fixture for test_full_node.py * Update test_full_node.py * Iterator... * for the whole directory * some fixtures back to module scope for reduced runtime * back to 40 minute workflow timeouts * these are being addressed separately
16 lines
555 B
Python
16 lines
555 B
Python
import asyncio
|
|
from typing import Iterator
|
|
|
|
import pytest
|
|
|
|
|
|
# This is an optimization to reduce runtime by reducing setup and teardown on the
|
|
# wallet nodes fixture below.
|
|
# https://github.com/pytest-dev/pytest-asyncio/blob/v0.18.1/pytest_asyncio/plugin.py#L479-L484
|
|
@pytest.fixture(scope="module")
|
|
def event_loop(request: "pytest.FixtureRequest") -> Iterator[asyncio.AbstractEventLoop]:
|
|
"""Create an instance of the default event loop for each test case."""
|
|
loop = asyncio.get_event_loop_policy().new_event_loop()
|
|
yield loop
|
|
loop.close()
|