Fix test_package after 12c795a

This commit is contained in:
Andrej730
2025-09-09 16:07:20 +05:00
parent 39702cc543
commit 338d3cf089
+8 -3
View File
@@ -47,15 +47,20 @@ class TestPackageSupportedPlatforms:
response = conn.getresponse()
build_html = response.read().decode("utf-8")
def find_make_var(var_name: str) -> str:
line = next(l for l in text.splitlines() if l.startswith(f"{var_name}:="))
return line.partition(":=")[2]
BINARY_VERSION = find_make_var("BINARY_VERSION")
URL_TYPES = ("IOS_URL", "IFCCONVERT_URL")
missing_urls: set[str] = set()
for url_type in URL_TYPES:
line = next(l for l in text.splitlines() if l.startswith(f"{url_type}:="))
_, _, url_template = line.partition(":=")
url_template = find_make_var(url_type)
url_template = url_template.replace("$(", "{").replace(")", "}")
for platform in SUPPORTED_PLATFORMS:
for pyver in SUPPORTED_PY_VERSIONS:
url = url_template.format(PYNUMBER=pyver, PLATFORM=platform)
url = url_template.format(PYNUMBER=pyver, PLATFORM=platform, BINARY_VERSION=BINARY_VERSION)
if url not in build_html:
missing_urls.add(url)