From 23425c9f8ff6f43ee7e0a0c4418b379e5a446749 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 28 Sep 2024 01:32:34 +0800 Subject: [PATCH] docs --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7c2d89b..c1f9ce8 100644 --- a/README.md +++ b/README.md @@ -17,14 +17,15 @@ pip install pytest-playwright-async ```py # tests/conftest.py + 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) # * @@ -33,6 +34,7 @@ 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' @@ -40,6 +42,7 @@ def anyio_backend(): ```py # tests/test_for_readme.py + from playwright.async_api import Page