fix graph and white background added

This commit is contained in:
Ayzen
2026-10-15 14:46:06 +03:00
parent 5102ed751c
commit 9a9b8ce5c7
35 changed files with 730 additions and 463 deletions
+19
View File
@@ -140,6 +140,25 @@ class ReplayTest(unittest.TestCase):
self.assertIn(unrelated, self.history.results)
self.writer_factory.assert_called_once_with(self.ring.name, self.ring.capacity, self.ring.slot_size_bytes)
def test_unreturned_sweeps_are_left_out_instead_of_mixing_settings(self) -> None:
sweeps = [_sweep(cid) for cid in range(1, 7)]
self.history.preprocessed.extend(sweeps)
self.history.results.extend(replace(_result_of(sweep), settings_revision=3) for sweep in sweeps)
def push_dropping_two(payload: bytes) -> bool:
accepted = self.processor.push(payload)
if self.processor.received[-1].collection_id in {2, 5}:
self.processor.published.pop()
return accepted
self.writer.push = push_dropping_two
with patch("python_app.gui.controllers.bscan_replay._REPLAY_CHUNK_TIMEOUT_S", .01):
self.assertTrue(self.run_replay())
source = self.history.bscan_source()
self.assertEqual([item.collection_id for item in source], [1, 3, 4, 6])
self.assertTrue(all(item.settings_revision == 7 for item in source))
self.assertEqual(self.warnings[-1], "B-scan replay recovered 4 of 6 re-sent sweeps; the image leaves the others out.")
def test_refuses_without_reader_or_active_ring_geometry(self) -> None:
self.history.preprocessed.append(_sweep(1))
self.assertFalse(self.replay.run(window=1, revision=7, ring=self.ring, reader=None,