diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 57fdca816..2b39d44b5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,7 +22,7 @@ repos: rev: v1.17.0 hooks: - id: mypy - additional_dependencies: [types-pyOpenSSL==24.1.0.20240722, types-requests==2.32.4.20250611] + additional_dependencies: [types-pyOpenSSL==24.1.0.20240722] - repo: https://github.com/pycqa/flake8 rev: 7.3.0 hooks: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c124806a9..93baff37a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -52,13 +52,6 @@ pre-commit run --all-files For more details look at the [CI configuration](./.github/workflows/ci.yml). -Collect coverage - -```sh -pytest --browser chromium --cov-report html --cov=playwright -open htmlcov/index.html -``` - ### Regenerating APIs `update_api.sh` generates `api.json` from a nearby `microsoft/playwright` diff --git a/local-requirements.txt b/local-requirements.txt index 72233857c..077ff9a77 100644 --- a/local-requirements.txt +++ b/local-requirements.txt @@ -1,8 +1,6 @@ asyncio-atexit==1.0.1 autobahn==23.1.2 -black==26.5.1 build==1.5.0 -flake8==7.3.0 mypy==2.3.0 objgraph==3.6.2 Pillow==12.3.0 @@ -11,13 +9,8 @@ pre-commit==3.5.0 pyOpenSSL==26.0.0 pytest==9.0.3 pytest-asyncio==1.4.0 -pytest-cov==7.1.0 -pytest-repeat==0.9.4 pytest-rerunfailures==16.4 pytest-timeout==2.4.0 -pytest-xdist==3.8.0 -requests==2.34.2 service_identity==24.2.0 twisted==25.5.0 types-pyOpenSSL==24.1.0.20240722 -types-requests==2.33.0.20260712 diff --git a/tests/async/test_browsertype_connect_cdp.py b/tests/async/test_browsertype_connect_cdp.py index dc66d3a07..71dcbbee3 100644 --- a/tests/async/test_browsertype_connect_cdp.py +++ b/tests/async/test_browsertype_connect_cdp.py @@ -13,10 +13,11 @@ # limitations under the License. import asyncio +import json +import urllib.request from typing import Dict import pytest -import requests from playwright.async_api import BrowserType, Error from tests.server import Server, WebSocketProtocol, find_free_port @@ -64,9 +65,9 @@ async def test_connect_to_an_existing_cdp_session_twice( def _ws_endpoint_from_url(url: str) -> str: - response = requests.get(url) - assert response.ok - response_body = response.json() + with urllib.request.urlopen(url) as response: + assert response.status == 200 + response_body: Dict[str, str] = json.load(response) return response_body["webSocketDebuggerUrl"]