feat: add recording toggle, stream stats UI

This commit is contained in:
jack
2026-07-06 12:44:43 -07:00
parent 3cc10ea7fe
commit 6996df73f8
7 changed files with 186 additions and 81 deletions
+20
View File
@@ -64,6 +64,26 @@ def test_compare_files_integration(controller):
assert "series_a" in args
assert "series_b" in args
def test_recording_toggle(controller, tmp_path):
csv_path = str(tmp_path / "rec" / "live_test.csv")
controller.startRecording(csv_path, "SN123")
assert controller.recording == True
controller.stopRecording()
assert controller.recording == False
# Header written with wafer serial
content = open(csv_path).read()
assert "Wafer ID=SN123" in content
def test_resync_count_default(controller):
# No active reader -> zero
assert controller.resyncCount == 0
controller._reader = MagicMock(resync_count=7)
assert controller.resyncCount == 7
controller._reader = None
def test_split_data_integration(controller):
# Mock the splitResult signal
mock_slot = MagicMock()