Skip to content

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

change default runloop scope to be session so that globals like PLAYWRIGHT API OBJECT dont get closed prematurely

Nick Sweeting44333e72de1e
diff --git a/pyproject.toml b/pyproject.toml
index fd3d0c476..b253a6306 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -117,8 +117,8 @@ include = [
[tool.pytest.ini_options]
asyncio_mode = "auto"
-asyncio_default_fixture_loop_scope = "module"
-asyncio_default_test_loop_scope = "module"
+asyncio_default_fixture_loop_scope = "session"
+asyncio_default_test_loop_scope = "session"
markers = [
"slow: marks tests as slow (deselect with `-m 'not slow'`)",
"integration: marks tests as integration tests",