Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

always group tests by class so they can reuse fixtures

Nick Sweeting7c317e95157b
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index 57db0ea1b..358b47749 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -89,7 +89,7 @@ jobs:
#- run: playwright install chrome # tests that need it can install it manually
- run: playwright install chromium
- - run: pytest --numprocesses auto -x tests/ci/${{ matrix.test_filename }}.py
+ - run: pytest --numprocesses auto --timeout=60 --dist=loadscope -xsv tests/ci/${{ matrix.test_filename }}.py
evaluate-tasks:
runs-on: ubuntu-latest
diff --git a/bin/test.sh b/bin/test.sh
index a36847c5f..8edcea9db 100755
--- a/bin/test.sh
+++ b/bin/test.sh
@@ -6,4 +6,4 @@
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd "$SCRIPT_DIR/.." || exit 1
-exec uv run pytest -xsv --numprocesses auto tests/ci
+exec uv run pytest -xsv --numprocesses auto --timeout=60 --dist=loadscope tests/ci
diff --git a/pyproject.toml b/pyproject.toml
index 06d2732d1..938531a08 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -143,7 +143,7 @@ testpaths = [
"tests"
]
python_files = ["test_*.py", "*_test.py"]
-addopts = "-v --strict-markers --tb=short"
+addopts = "-v --strict-markers --tb=short --dist=loadscope"
log_cli = true
log_cli_format = "%(levelname)-8s [%(name)s] %(message)s"
filterwarnings = [