Skip to content

Commit 37f4c8d

Browse files
committed
Use explicit pytest_asyncio fixture
1 parent 019e747 commit 37f4c8d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test_elasticsearch/test_async/test_server/conftest.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@
1919
import sniffio
2020

2121
import elasticsearch
22+
import pytest_asyncio
2223

2324
from ...utils import CA_CERTS, wipe_cluster
2425

2526

26-
@pytest.fixture(scope="function")
27+
@pytest_asyncio.fixture(scope="function")
2728
async def async_client_factory(elasticsearch_url):
2829
kwargs = {}
2930
if sniffio.current_async_library() == "trio":
@@ -42,7 +43,7 @@ async def async_client_factory(elasticsearch_url):
4243
await client.close()
4344

4445

45-
@pytest.fixture(scope="function")
46+
@pytest_asyncio.fixture(scope="function")
4647
def async_client(async_client_factory):
4748
try:
4849
yield async_client_factory

0 commit comments

Comments
 (0)