Update dependency pytest-asyncio to v1.2.0 (#492)
* Update dependency pytest-asyncio to v1.2.0 * don't stop the event loop between test set the loop_scope to session for async tests * remove loop_scope="session" --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Stefan Allius <stefan.allius@t-online.de>
This commit is contained in:
@@ -186,7 +186,7 @@ class TestHypercornLogHndl:
|
||||
|
||||
|
||||
class TestApp:
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.asyncio(loop_scope="session")
|
||||
async def test_ready(self):
|
||||
"""Test the ready route."""
|
||||
|
||||
@@ -204,7 +204,7 @@ class TestApp:
|
||||
result = await response.get_data()
|
||||
assert result == b"Is ready"
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.asyncio(loop_scope="session")
|
||||
async def test_healthy(self):
|
||||
"""Test the healthy route."""
|
||||
reader = FakeReader()
|
||||
@@ -225,7 +225,7 @@ class TestApp:
|
||||
result = await response.get_data()
|
||||
assert result == b"I'm fine"
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.asyncio(loop_scope="session")
|
||||
async def test_unhealthy(self, monkeypatch, caplog):
|
||||
"""Test the healthy route."""
|
||||
def result_false(self):
|
||||
|
||||
Reference in New Issue
Block a user