Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
fix(tests): remove unused imports and fix formatting
ShawnPanae34ee5898eed
diff --git a/tests/ci/test_doctor_command.py b/tests/ci/test_doctor_command.pyindex 3b07f9f6b..eeec1164e 100644--- a/tests/ci/test_doctor_command.py+++ b/tests/ci/test_doctor_command.py@@ -50,7 +50,6 @@ async def test_doctor_issues():def test_check_package_installed():"""Test _check_package when installed."""- import browser_useresult = doctor._check_package()assert result['status'] == 'ok'diff --git a/tests/ci/test_install_config.py b/tests/ci/test_install_config.pyindex 9c86883de..02b389e1e 100644--- a/tests/ci/test_install_config.py+++ b/tests/ci/test_install_config.py@@ -1,7 +1,6 @@"""Tests for install configuration module."""import json-import tempfilefrom pathlib import Pathfrom unittest.mock import patch@@ -35,9 +34,7 @@ class TestInstallConfig:# Create config file with remote-only modetemp_config_dir.parent.mkdir(parents=True, exist_ok=True)- temp_config_dir.write_text(- json.dumps({'installed_modes': ['remote'], 'default_mode': 'remote'})- )+ temp_config_dir.write_text(json.dumps({'installed_modes': ['remote'], 'default_mode': 'remote'}))config = get_config()assert config['installed_modes'] == ['remote']diff --git a/tests/ci/test_session_browser_mode.py b/tests/ci/test_session_browser_mode.pyindex 0bc26ddf5..40c72d97a 100644--- a/tests/ci/test_session_browser_mode.py+++ b/tests/ci/test_session_browser_mode.py@@ -7,9 +7,6 @@ subsequent commands with a different mode should error with helpful guidance.import jsonimport tempfilefrom pathlib import Path-from unittest.mock import patch--import pytestfrom browser_use.skill_cli.main import get_session_metadata_path@@ -33,11 +30,13 @@ def test_metadata_file_format():try:# Write metadata as the code doesmeta_path.write_text(- json.dumps({- 'browser_mode': 'chromium',- 'headed': False,- 'profile': None,- })+ json.dumps(+ {+ 'browser_mode': 'chromium',+ 'headed': False,+ 'profile': None,+ }+ ))# Read and verify@@ -55,11 +54,13 @@ def test_metadata_file_remote_mode():meta_path = get_session_metadata_path('test-remote')try:meta_path.write_text(- json.dumps({- 'browser_mode': 'remote',- 'headed': True,- 'profile': 'cloud-profile-123',- })+ json.dumps(+ {+ 'browser_mode': 'remote',+ 'headed': True,+ 'profile': 'cloud-profile-123',+ }+ ))meta = json.loads(meta_path.read_text())diff --git a/tests/ci/test_setup_command.py b/tests/ci/test_setup_command.pyindex 6577450dc..e9aa2676c 100644--- a/tests/ci/test_setup_command.py+++ b/tests/ci/test_setup_command.py@@ -4,8 +4,6 @@ These tests call real functions without mocking. They verify thestructure and logic of the setup command against actual system state."""-import pytest-from browser_use.skill_cli.commands import setup