diff --git a/archivebox/tests/conftest.py b/archivebox/tests/conftest.py index 9fc61844..fe0dd903 100644 --- a/archivebox/tests/conftest.py +++ b/archivebox/tests/conftest.py @@ -449,6 +449,9 @@ def real_archive_with_example(tmp_path_factory, request): "USE_COLOR": "False", "RESPONSES_TIMEOUT": "30", } + system_browser = _find_system_browser() + if system_browser: + add_env["CHROME_BINARY"] = str(system_browser) stdout, stderr, returncode = run_archivebox_cmd_cwd( ["add", "--depth=0", "--plugins=responses", "https://example.com"], cwd=tmp_path, diff --git a/archivebox/tests/test_cli_install.py b/archivebox/tests/test_cli_install.py index 3b0057a2..3d64c916 100644 --- a/archivebox/tests/test_cli_install.py +++ b/archivebox/tests/test_cli_install.py @@ -160,10 +160,10 @@ def test_install_updates_binary_table(tmp_path, process): ) result = subprocess.run( - ["archivebox", "install"], + ["archivebox", "install", "pip"], capture_output=True, text=True, - timeout=420, + timeout=120, env=env, ) @@ -182,8 +182,12 @@ def test_install_updates_binary_table(tmp_path, process): sealed_crawls = c.execute( "SELECT COUNT(*) FROM crawls_crawl WHERE status='sealed'", ).fetchone()[0] + installed_python = c.execute( + "SELECT COUNT(*) FROM machine_binary WHERE status='installed' AND name='python'", + ).fetchone()[0] conn.close() assert sealed_crawls == 0 assert snapshot_count == 0 assert binary_counts.get("installed", 0) > 0 + assert installed_python == 1