Skip to content

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

move pytest.ini into pyproject.toml

Nick Sweeting2868c44e4358
diff --git a/pyproject.toml b/pyproject.toml
index 5f7ad38f6..c4cfdd192 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -77,6 +77,11 @@ Repository = "https://github.com/browser-use/browser-use"
browseruse = "browser_use.cli:main"
browser-use = "browser_use.cli:main"
+[build-system]
+requires = ["hatchling"]
+build-backend = "hatchling.build"
+
+
[tool.codespell]
ignore-words-list = "bu,wit,dont,cant,wont"
skip = "*.json"
@@ -101,10 +106,6 @@ skip-magic-trailing-comma = false
[tool.pyright]
typeCheckingMode = "off"
-[build-system]
-requires = ["hatchling"]
-build-backend = "hatchling.build"
-
[tool.hatch.build]
include = [
"browser_use/**/*.py",
@@ -114,6 +115,30 @@ include = [
"browser_use/dom/buildDomTree.js",
]
+[tool.pytest.ini_options]
+asyncio_mode = "auto"
+asyncio_default_fixture_loop_scope = "module"
+asyncio_default_test_loop_scope = "module"
+markers = [
+ "slow: marks tests as slow (deselect with `-m 'not slow'`)",
+ "integration: marks tests as integration tests",
+ "unit: marks tests as unit tests",
+ "asyncio: mark tests as async tests",
+]
+testpaths = [
+ "tests"
+]
+python_files = ["test_*.py", "*_test.py"]
+addopts = "-v --strict-markers --tb=short"
+log_cli = true
+log_cli_format = "%(levelname)-8s [%(name)s] %(message)s"
+filterwarnings = [
+ "ignore::pytest.PytestDeprecationWarning",
+ "ignore::DeprecationWarning",
+]
+log_level = "INFO"
+
+
[tool.uv]
dev-dependencies = [
"ruff>=0.11.2",