Skip to content

Commit 5fd2a4f

Browse files
committed
Stabilize recording and camera tests
Update tests to match recent recording/capture API changes and reduce flakiness. Camera dialog E2E stubs now return `CapturedFrame`, multicam tests validate the new recording sink path (including timestamp metadata forwarding), and recording manager tests consistently clean up with `stop_all()` plus queue flushes before assertions. GUI overlay tests tied to removed behavior are now skipped, and config tests now expect numeric `-input_framerate` values instead of formatted strings.
1 parent e9504bd commit 5fd2a4f

5 files changed

Lines changed: 344 additions & 257 deletions

File tree

tests/gui/camera_config/test_cam_dialog_e2e.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from PySide6.QtCore import Qt
99
from PySide6.QtWidgets import QMessageBox
1010

11-
from dlclivegui.cameras.base import CameraBackend
11+
from dlclivegui.cameras.base import CameraBackend, CapturedFrame
1212
from dlclivegui.cameras.factory import CameraFactory, DetectedCamera
1313
from dlclivegui.config import CameraSettings, MultiCameraSettings
1414
from dlclivegui.gui.camera_config.camera_config_dialog import CameraConfigDialog
@@ -194,7 +194,7 @@ def close(self):
194194
self._opened = False
195195

196196
def read(self):
197-
return np.zeros((30, 40, 3), dtype=np.uint8), 0.1
197+
return CapturedFrame(np.zeros((30, 40, 3), dtype=np.uint8), 0.1, None)
198198

199199
CountingBackend.opens = 0
200200
monkeypatch.setattr(CameraFactory, "create", staticmethod(lambda s: CountingBackend(s)))
@@ -238,7 +238,7 @@ def close(self):
238238
self._opened = False
239239

240240
def read(self):
241-
return np.zeros((30, 40, 3), dtype=np.uint8), 0.1
241+
return CapturedFrame(np.zeros((30, 40, 3), dtype=np.uint8), 0.1, None)
242242

243243
CountingBackend.opens = 0
244244
monkeypatch.setattr(CameraFactory, "create", staticmethod(lambda s: CountingBackend(s)))

tests/gui/test_pose_overlay.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ def stop(self):
99

1010
@pytest.mark.gui
1111
@pytest.mark.timeout(10)
12+
@pytest.mark.skip("Removed functionality.")
1213
def test_record_overlay_uses_identity_transform_for_per_camera_recording(window, draw_pose_stub):
1314
# Disable event timers to avoid GUI rendering pipelines interfering with test
1415
window._display_timer.stop()
@@ -47,6 +48,7 @@ def test_record_overlay_uses_identity_transform_for_per_camera_recording(window,
4748

4849
@pytest.mark.gui
4950
@pytest.mark.timeout(10)
51+
@pytest.mark.skip("Removed functionality.")
5052
def test_record_overlay_toggle_affects_frames_sent_to_recorder(window, recording_frame_spy, draw_pose_stub):
5153
# Disable event timers to avoid GUI rendering pipelines interfering with test
5254
window._display_timer.stop()

0 commit comments

Comments
 (0)