Skip to content

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

fix: close log file handle on successful daemon start in test

ShawnPana8577c789ebd8
diff --git a/tests/ci/test_cli_lifecycle.py b/tests/ci/test_cli_lifecycle.py
index 841bc4e37..4fd7bf7c1 100644
--- a/tests/ci/test_cli_lifecycle.py
+++ b/tests/ci/test_cli_lifecycle.py
@@ -53,6 +53,7 @@ def _start_daemon(home_dir: Path, session: str = 'default', timeout: float = 10.
try:
state = json.loads(state_path.read_text())
if state.get('phase') in ('ready', 'running'):
+ log_file.close()
return proc.pid
except (json.JSONDecodeError, OSError):
pass