From fae4bbc90aa4dcd349d45fc4445409ecc1ed0d4e Mon Sep 17 00:00:00 2001 From: Oleg Makarov Date: Tue, 24 Nov 2026 01:11:21 +0300 Subject: [PATCH] ps_sweep: preserve proven color mismatches in exact reports --- tests/test_ps_sweep.py | 34 ++++++++++++++++++++++++++++++++++ tools/ps_sweep.py | 3 ++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/tests/test_ps_sweep.py b/tests/test_ps_sweep.py index 1eb1efb27..40721b09b 100644 --- a/tests/test_ps_sweep.py +++ b/tests/test_ps_sweep.py @@ -326,6 +326,40 @@ class CompareCommand(unittest.TestCase): self.assertEqual(ps_sweep.depth_measurements(0, rec, rec), {"depth_class": "incompatible"}) self.assertEqual(ps_sweep.depth_measurements(0, {"code": 0}, rec), {"depth_class": "missing"}) + def test_exact_keeps_color_mismatch_with_bad_depth(self): + with tempfile.TemporaryDirectory() as tmp: + out = Path(tmp) + pixels = ps_sweep.W * ps_sweep.H + floats = pixels * 4 + color_a = struct.pack("