Speed up pytest with eager page loads

This commit is contained in:
Zed 2026-07-11 00:12:02 +02:00
commit 5100290f76
3 changed files with 6 additions and 2 deletions

4
tests/conftest.py Normal file
View file

@ -0,0 +1,4 @@
from seleniumbase.config import settings
settings.SKIP_JS_WAITS = True
settings.WAIT_FOR_RSC_ON_PAGE_LOADS = False

View file

@ -8,4 +8,4 @@ python = "^3.14"
seleniumbase = "4.46.5" seleniumbase = "4.46.5"
[tool.pytest.ini_options] [tool.pytest.ini_options]
addopts = "--timeout_multiplier=3" addopts = "--pls=eager --reruns=3 --timeout_multiplier=3"

View file

@ -8,7 +8,7 @@ def curl_status(url):
"""Get HTTP status code using curl to avoid URL normalization by Python libs.""" """Get HTTP status code using curl to avoid URL normalization by Python libs."""
result = subprocess.run( result = subprocess.run(
['curl', '-s', '-o', '/dev/null', '-w', '%{http_code}', url], ['curl', '-s', '-o', '/dev/null', '-w', '%{http_code}', url],
capture_output=True, text=True, timeout=10 capture_output=True, text=True, timeout=30
) )
return int(result.stdout) return int(result.stdout)