From 7e00112fec03d4f7581c065d8796159488aa6fb5 Mon Sep 17 00:00:00 2001 From: DetachHead <57028336+DetachHead@users.noreply.github.com> Date: Fri, 25 Oct 2024 23:27:14 +1000 Subject: [PATCH] docs(python): improve the typing example with the pytest plugin (#33296) --- docs/src/test-runners-python.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/src/test-runners-python.md b/docs/src/test-runners-python.md index 0ad4043066..d07fa2e53f 100644 --- a/docs/src/test-runners-python.md +++ b/docs/src/test-runners-python.md @@ -99,7 +99,7 @@ See [Running Tests](./running-tests.md) for general information on `pytest` opti ## Examples -### Configure Mypy typings for auto-completion +### Configure typings for auto-completion ```py title="test_my_application.py" from playwright.sync_api import Page @@ -109,6 +109,8 @@ def test_visit_admin_dashboard(page: Page): # ... ``` +If you're using VSCode with Pylance, these types can be inferred by enabling the `python.testing.pytestEnabled` setting so you don't need the type annotation. + ### Configure slow mo Run tests with slow mo with the `--slowmo` argument.