From dad3af8342b370dc046c61f2002dca431684c039 Mon Sep 17 00:00:00 2001 From: snushev Date: Fri, 7 Aug 2026 20:22:10 +0300 Subject: [PATCH] fix(tests): return actual download count in run_cli to fix false positive (#155) --- tests/test_no_chrome.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_no_chrome.py b/tests/test_no_chrome.py index 0b7f60b..504e52a 100644 --- a/tests/test_no_chrome.py +++ b/tests/test_no_chrome.py @@ -3,6 +3,7 @@ Network, extraction and Chrome are stubbed at the moon_extract level: what is under test is the dispatcher's decision to launch, not the extractors. """ + from __future__ import annotations import asyncio @@ -53,7 +54,7 @@ def run_cli(urls, retries=1) -> dict: with tempfile.TemporaryDirectory() as out: asyncio.run(moon_cli.run(urls, out, 4, 4, retries, "proxies.txt")) done = len(os.listdir(out)) - return {"ok": len(urls) if done == 0 else done, "fail": 0} + return {"ok": done, "fail": len(urls) - done} def assert_browser_counts(result, calls, urls, want_browsers: int) -> None: