1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-19 22:18:13 +00:00

fix(tests): url-safe name for hyperlinks (for when there's a backslash)

This commit is contained in:
matejcik 2023-04-05 17:38:44 +02:00 committed by matejcik
parent e5ed9d3df4
commit 5fa1a33a1d

View File

@ -1,6 +1,7 @@
from __future__ import annotations
import shutil
import urllib.parse
from pathlib import Path
from typing import Iterable
@ -36,7 +37,8 @@ def report_links(
th("Link to report")
for test in sorted(tests):
with tr(data_actual_hash=actual_hashes.get(test.stem, "")):
path = test.relative_to(reports_path)
urlsafe = urllib.parse.quote(test.name)
path = test.with_name(urlsafe).relative_to(reports_path)
td(a(test.name, href=path))