aboutsummaryrefslogtreecommitdiff
path: root/scripts/test_preview.py
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-07-25 02:40:14 +0300
committerGitHub <noreply@github.com>2026-07-25 02:40:14 +0300
commit8afd52ae57f9237f4f46138ad224dfc621d7ba59 (patch)
tree349bbbd86c57863539ebc4c2eacf34550e076fa2 /scripts/test_preview.py
parent5f1957c27bd23f73b339265d3acd32f4a21878a3 (diff)
fix: bundle modern ConPTY on Windows (#1828)
refs #1533 refs #1644
Diffstat (limited to 'scripts/test_preview.py')
-rw-r--r--scripts/test_preview.py29
1 files changed, 27 insertions, 2 deletions
diff --git a/scripts/test_preview.py b/scripts/test_preview.py
index e11af67c..7b11d4c7 100644
--- a/scripts/test_preview.py
+++ b/scripts/test_preview.py
@@ -39,7 +39,10 @@ class PreviewNotesTests(unittest.TestCase):
base_version="0.6.6",
protocol=12,
notes=notes,
- shas={"linux-x86_64": "deadbeef"},
+ shas={
+ "linux-x86_64": "deadbeef",
+ "windows-x86_64": "a" * 64,
+ },
retain=30,
)
data = json.loads(content)
@@ -51,10 +54,32 @@ class PreviewNotesTests(unittest.TestCase):
)
self.assertEqual(
data["assets"]["windows-x86_64"]["url"],
- "https://github.com/ogulcancelik/herdr/releases/download/preview-2026-06-02-abcdef123456/herdr-windows-x86_64.exe",
+ "https://github.com/ogulcancelik/herdr/releases/download/preview-2026-06-02-abcdef123456/herdr-windows-x86_64.zip",
)
+ self.assertEqual(
+ data["assets"]["windows-x86_64"]["sha256"],
+ "a" * 64,
+ )
+ self.assertEqual(data["assets"]["windows-x86_64"]["format"], "zip")
self.assertIn("2026-06-02-abcdef123456", data["builds"])
+ def test_windows_preview_asset_requires_sha256(self):
+ with tempfile.TemporaryDirectory() as tmp:
+ with self.assertRaisesRegex(ValueError, "windows-x86_64 requires"):
+ preview.build_manifest(
+ output=Path(tmp) / "preview.json",
+ repo="ogulcancelik/herdr",
+ tag="preview-test",
+ build_id="test",
+ commit="abcdef",
+ built_at="2026-06-02T03:00:00Z",
+ base_version="0.6.6",
+ protocol=12,
+ notes="test",
+ shas={},
+ retain=1,
+ )
+
def test_hidden_subjects_include_preview_manifest_commits(self):
self.assertTrue(preview.hidden_subject("docs: update preview manifest"))
self.assertTrue(preview.hidden_subject("docs: update website manifest"))