From a60312a9b857f3924793385077c1c3f032d6c62e Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Sat, 30 Aug 2025 10:35:54 -0500 Subject: [PATCH] Improve publish test error when no versions are found (#15594) --- scripts/publish/test_publish.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/publish/test_publish.py b/scripts/publish/test_publish.py index c2c35fe90..a9dfcd49c 100644 --- a/scripts/publish/test_publish.py +++ b/scripts/publish/test_publish.py @@ -194,6 +194,10 @@ def get_latest_version(target: str, client: httpx.Client) -> Version: time.sleep(1) else: raise RuntimeError(f"Failed to fetch {url}") from error + + if not versions: + raise ValueError(f"No versions found for {target_config.project_name}") + return max(versions)