mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-06 07:47:53 +10:00
split CrawlSetup into Install phase with new Binary + BinaryRequest events
This commit is contained in:
@@ -337,11 +337,7 @@ def test_binary_create_stdout_pipes_into_run(initialized_archive):
|
||||
assert create_code == 0, create_stderr
|
||||
_assert_stdout_is_jsonl_only(create_stdout)
|
||||
|
||||
binary = next(
|
||||
record
|
||||
for record in parse_jsonl_output(create_stdout)
|
||||
if record.get("type") in {"BinaryRequest", "Binary"}
|
||||
)
|
||||
binary = next(record for record in parse_jsonl_output(create_stdout) if record.get("type") in {"BinaryRequest", "Binary"})
|
||||
|
||||
run_stdout, run_stderr, run_code = run_archivebox_cmd(
|
||||
["run"],
|
||||
@@ -353,10 +349,7 @@ def test_binary_create_stdout_pipes_into_run(initialized_archive):
|
||||
_assert_stdout_is_jsonl_only(run_stdout)
|
||||
|
||||
run_records = parse_jsonl_output(run_stdout)
|
||||
assert any(
|
||||
record.get("type") in {"BinaryRequest", "Binary"} and record.get("id") == binary["id"]
|
||||
for record in run_records
|
||||
)
|
||||
assert any(record.get("type") in {"BinaryRequest", "Binary"} and record.get("id") == binary["id"] for record in run_records)
|
||||
|
||||
status = _db_value(
|
||||
initialized_archive,
|
||||
|
||||
@@ -318,7 +318,9 @@ def test_installed_binary_config_overrides_include_valid_installed_binaries(monk
|
||||
monkeypatch.setattr(
|
||||
Path,
|
||||
"is_file",
|
||||
lambda self: str(self) in {sys.executable, mercury_binary.abspath, wget_binary.abspath, puppeteer_binary.abspath, ytdlp_binary.abspath},
|
||||
lambda self: (
|
||||
str(self) in {sys.executable, mercury_binary.abspath, wget_binary.abspath, puppeteer_binary.abspath, ytdlp_binary.abspath}
|
||||
),
|
||||
)
|
||||
monkeypatch.setattr(
|
||||
runner_module.os,
|
||||
|
||||
Reference in New Issue
Block a user