Skip to content

Commit 9be952e

Browse files
pquentingithub-actions[bot]
authored andcommitted
Fix pytest 9 error (#3152)
* Fix pytest 9 error * Use explicit pytest_asyncio fixture * Revert "Fix pytest 9 error" This reverts commit 019e747. * Fix lint * Fix lint better * Add back type ignore (cherry picked from commit 3a15e1b)
1 parent 3480552 commit 9be952e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test_elasticsearch/test_async/test_server/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
import pytest
18+
import pytest_asyncio
1919
import sniffio
2020

2121
import elasticsearch
2222

2323
from ...utils import CA_CERTS, wipe_cluster
2424

2525

26-
@pytest.fixture(scope="function")
26+
@pytest_asyncio.fixture(scope="function")
2727
async def async_client_factory(elasticsearch_url):
2828
kwargs = {}
2929
if sniffio.current_async_library() == "trio":
@@ -42,7 +42,7 @@ async def async_client_factory(elasticsearch_url):
4242
await client.close()
4343

4444

45-
@pytest.fixture(scope="function")
45+
@pytest_asyncio.fixture(scope="function")
4646
def async_client(async_client_factory):
4747
try:
4848
yield async_client_factory

0 commit comments

Comments
 (0)