Skip to content

Commit 99f4bfa

Browse files
committed
Fix warnings regarding asyncio
1 parent 813952c commit 99f4bfa

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

setup.cfg

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ profile = black
1818

1919
[tool:pytest]
2020
addopts = --ignore=test_build.py
21-
markers =
21+
asyncio_mode = auto
22+
markers =
2223
authentication
2324
db
2425
fastapi_users

tests/conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class UserDBOAuth(UserOAuth, UserDB):
3232
@pytest.fixture(scope="session")
3333
def event_loop():
3434
"""Force the pytest-asyncio loop to be the main one."""
35-
loop = asyncio.get_event_loop()
35+
loop = asyncio.new_event_loop()
3636
yield loop
3737

3838

0 commit comments

Comments
 (0)