Skip to content
Snippets Groups Projects
Commit 4ff935a8 authored by Emanuele Aina's avatar Emanuele Aina
Browse files

test_urls: Emojis!


Make spotting failures in the output more easy with colored icons.

Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
parent bddc195e
No related branches found
No related tags found
1 merge request!278Speedup test_urls
......@@ -126,7 +126,7 @@ def url_check(url):
print(f"ERROR(2): {url} {resp.status_code if resp else '-'}\n{e_str}")
end = time.perf_counter()
print(url, "OK" if status else "FAIL", resp.status_code if resp else "-", f"{end - start:0.4f}s")
print(url, "OK" if status else "FAIL 💔", resp.status_code if resp else "-", f"{end - start:0.4f}s")
return url, status
def urls_check(urls):
......@@ -155,6 +155,6 @@ with concurrent.futures.ThreadPoolExecutor(max_workers=PARALLEL) as executor:
print(f"Found {len(broken)} broken URLs in {len(urls)} tested:")
for b in broken:
print(" ", b)
print("💔 ", b)
sys.exit(1 if broken else 0)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment