File: tests-Don-t-use-pytest.mark.asyncio.patch

package info (click to toggle)
python-odmantic 1.0.2-4
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,640 kB
  • sloc: python: 8,547; sh: 37; makefile: 34; xml: 13; javascript: 3
file content (24 lines) | stat: -rw-r--r-- 890 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: Carsten Schoenert <c.schoenert@t-online.de>
Date: Sun, 29 Dec 2024 23:15:59 +0200
Subject: tests: Don't use pytest.mark.asyncio

This marker is deprecated and did never work in the way it was intended
by people who have added this.
See: https://docs.pytest.org/en/stable/deprecations.html#applying-a-mark-to-a-fixture-function
---
 tests/integration/conftest.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py
index 099c34f..8812c82 100644
--- a/tests/integration/conftest.py
+++ b/tests/integration/conftest.py
@@ -62,7 +62,7 @@ def database_name():
     return f"odmantic-test-{uuid4()}"
 
 
-@pytest.mark.asyncio
+#@pytest.mark.asyncio
 @pytest.fixture(scope="function")
 async def aio_engine(motor_client: AsyncIOMotorClient, database_name: str):
     sess = AIOEngine(motor_client, database_name)