upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/tests/test_progress_dashboard.py
diff options
context:
space:
mode:
authorDadaCap <167002618+DadaCap@users.noreply.github.com>2026-11-24 21:09:02 +0100
committerDadaCap <167002618+DadaCap@users.noreply.github.com>2026-11-24 21:09:02 +0100
commitbc245e5046124941bbdc7bb5c3bd7c739da4e03e (patch)
tree5b780fbcbc1dd131ee635980dfe3e996ac72928f /tests/test_progress_dashboard.py
parent30450e0e96e1df700bbfa9505433c9b9940e8694 (diff)
parent58be9cdf8df9a31bc7f6c068991f1aed381f7f4d (diff)
Merge remote-tracking branch 'origin/main' into vcc-tuple-resync
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/test_progress_dashboard.py')
-rw-r--r--tests/test_progress_dashboard.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_progress_dashboard.py b/tests/test_progress_dashboard.py
index ad22e8149..b5a15e80c 100644
--- a/tests/test_progress_dashboard.py
+++ b/tests/test_progress_dashboard.py
@@ -618,6 +618,22 @@ class Outputs(unittest.TestCase):
618 with open(os.path.join(out, "history.json"), encoding="utf-8") as f: 618 with open(os.path.join(out, "history.json"), encoding="utf-8") as f:
619 self.assertEqual(len(json.load(f)), 1) 619 self.assertEqual(len(json.load(f)), 1)
620 620
621 def test_different_snapshots_in_the_same_second_are_preserved(self):
622 first = {"generated_at": "2026-11-24T00:00:00Z", "git": {"head": "a" * 40},
623 "metrics": [], "content_hash": "a" * 64}
624 second = {**first, "git": {"head": "b" * 40}, "content_hash": "b" * 64}
625 with tempfile.TemporaryDirectory() as out:
626 self.assertTrue(pd.write_outputs(first, out))
627 self.assertTrue(pd.write_outputs(second, out))
628 self.assertFalse(pd.write_outputs(second, out))
629
630 folder = Path(out)
631 snapshots = [json.loads(path.read_text(encoding="utf-8"))
632 for path in (folder / "snapshots").glob("progress_*.json")]
633 self.assertCountEqual(snapshots, [first, second])
634 history = json.loads((folder / "history.json").read_text(encoding="utf-8"))
635 self.assertEqual(history, [pd.summary_line(first), pd.summary_line(second)])
636
621 def test_unmatched_test_filter_preserves_cached_results(self): 637 def test_unmatched_test_filter_preserves_cached_results(self):
622 with tempfile.TemporaryDirectory() as out: 638 with tempfile.TemporaryDirectory() as out:
623 cached = os.path.join(out, "unit_results.json") 639 cached = os.path.join(out, "unit_results.json")