Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
m9810223 committed Sep 27, 2024
1 parent 80ad945 commit 0901a0e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import asyncio

import nest_asyncio
import nest_asyncio # pip install nest-asyncio
import pytest


@pytest.fixture(scope='session', autouse=True)
def event_loop(): # https://pytest-asyncio.readthedocs.io/en/latest/reference/fixtures.html#fixtures
def event_loop():
policy = asyncio.get_event_loop_policy()
loop = policy.new_event_loop()
nest_asyncio._patch_loop(loop) # *
Expand All @@ -14,5 +14,6 @@ def event_loop(): # https://pytest-asyncio.readthedocs.io/en/latest/reference/f


@pytest.fixture(scope='session', autouse=True)
# pip install anyio
def anyio_backend():
return 'asyncio'

0 comments on commit 0901a0e

Please sign in to comment.