From c9990e43e958f7f8717252e4c9ea7245b890465a Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 27 Oct 2026 16:14:01 +0100 Subject: [PATCH 1/2] nightly_set tests: the scheduled refresh and the notes move with nightly.py (next PR) Co-Authored-By: Claude Opus 5.5 --- tests/test_nightly_set.py | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/tests/test_nightly_set.py b/tests/test_nightly_set.py index 5002fb137..9a0e16778 100644 --- a/tests/test_nightly_set.py +++ b/tests/test_nightly_set.py @@ -4,7 +4,6 @@ import tempfile import unittest from pathlib import Path -from tools.ci import nightly from tools.ci import nightly_set as ns ROOT = Path(__file__).resolve().parents[1] @@ -153,26 +152,6 @@ class SetTests(unittest.TestCase): "nightly/build-2026-10-28-5") -class ScheduledTests(unittest.TestCase): - def test_the_scheduled_nightly_takes_new_heads_and_drops_closed_ones(self): - state = run({}, "/nightly 1 2 3 4", "kacpherek", pr(1), pr(2), pr(3), pr(4)).state - get = lookup(pr(1, head="new"), pr(2, state="merged"), pr(3, state="closed"), - pr(4, files=[".github/workflows/x.yml"])) - kept, left_out = nightly.refresh(state["prs"], get, PATTERNS) - self.assertEqual([(e["number"], e["head"]) for e in kept], [(1, "new1")]) - self.assertEqual(len(left_out), 3) - self.assertIn("merged", left_out[0]) - - def test_notes_list_each_pull_request_and_who_picked_it(self): - prs = run({}, "/nightly 1 2", "kacpherek", pr(1), pr(2)).state["prs"] - main = nightly.Ref("main", "m" * 40, None) - text = nightly.set_notes("2026-10-28", nightly.Ref("nightly/build-2026-10-28-1", "b" * 40, None), main, prs, - ["#3 Fix 3: closed, left out"]) - self.assertIn("can include pull requests not reviewed yet, picked by trusted reviewers", text) - self.assertIn("- Fix 1 (#1) by dev1, at h1, picked by kacpherek", text) - self.assertIn("### Left out (1)", text) - - def sh(repo, *args, env=None): return subprocess.run(["git", *args], cwd=repo, check=True, capture_output=True, text=True, env={**os.environ, **(env or {})}).stdout.strip() From 6c0e262aa070d0e34006049c62379057f8405bb2 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 27 Oct 2026 16:14:39 +0100 Subject: [PATCH 2/2] nightly_set tests: the repo's list file is checked with it (next PR) Co-Authored-By: Claude Opus 5.5 --- tests/test_nightly_set.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/test_nightly_set.py b/tests/test_nightly_set.py index 9a0e16778..f29c1dabe 100644 --- a/tests/test_nightly_set.py +++ b/tests/test_nightly_set.py @@ -71,12 +71,6 @@ class AllowTests(unittest.TestCase): ns.authorize("kacpherek", reviewers) ns.authorize("ludovic111", reviewers) - def test_the_repos_list_names_the_three_reviewers(self): - reviewers = ns.read_reviewers((ROOT / ns.REVIEWERS).read_text()) - self.assertEqual(reviewers.logins, {"kacpherek", "rdbtcvs", "levzzz5154"}) - self.assertFalse(reviewers.paused) - - class RefusalTests(unittest.TestCase): def test_what_codeowners_guards_is_refused(self): for path in (".github/workflows/x.yml", "tools/ci/nightly.py", "crates/horizon-release-sign/src/lib.rs",