Skip to content

Commit 688cf18

Browse files
committed
Update recording manager test imports
Adjust test fixtures and GUI recording manager tests to import `RecordingManager` and related module symbols from `dlclivegui.services.recording_manager` instead of the old `dlclivegui.gui.recording_manager` path.
1 parent a5d53b2 commit 688cf18

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

tests/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ def _fake_start_all(self, recording, active_cams, current_frames, **kwargs):
325325
run_dir.mkdir(parents=True, exist_ok=True)
326326
return run_dir
327327

328-
from dlclivegui.gui import recording_manager as rm_mod
328+
from dlclivegui.services import recording_manager as rm_mod
329329

330330
monkeypatch.setattr(rm_mod.RecordingManager, "start_all", _fake_start_all)
331331
return calls
@@ -409,7 +409,7 @@ def recording_settings(app_config_two_cams):
409409

410410
@pytest.fixture
411411
def patch_video_recorder(monkeypatch):
412-
import dlclivegui.gui.recording_manager as rm_mod
412+
import dlclivegui.services.recording_manager as rm_mod
413413

414414
monkeypatch.setattr(rm_mod, "VideoRecorder", FakeVideoRecorder)
415415
return FakeVideoRecorder
@@ -428,7 +428,7 @@ def _fake_write_frame(cam_id, frame, timestamp=None, timestamp_metadata=None):
428428

429429
@pytest.fixture
430430
def patch_build_run_dir(monkeypatch, tmp_path):
431-
import dlclivegui.gui.recording_manager as rm_mod
431+
import dlclivegui.services.recording_manager as rm_mod
432432

433433
spy = {"session_dir": None, "use_timestamp": None}
434434
run_dir = tmp_path / "videos" / "Sess_SANITIZED" / "run_TEST"

tests/gui/test_rec_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import pytest
55

66
from dlclivegui.config import CameraSettings
7-
from dlclivegui.gui.recording_manager import RecordingManager
87
from dlclivegui.services.multi_camera_controller import get_camera_id, get_display_id
8+
from dlclivegui.services.recording_manager import RecordingManager
99
from dlclivegui.utils.stats import RecorderStats
1010
from dlclivegui.utils.timestamps import FrameTimestampMetadata
1111

@@ -214,7 +214,7 @@ def test_write_frame_uses_time_when_timestamp_missing(
214214
mgr = RecordingManager()
215215
mgr.start_all(recording_settings, _active_cams_two, current_frames, session_name="Sess")
216216

217-
import dlclivegui.gui.recording_manager as rm_mod # noqa: E402
217+
import dlclivegui.services.recording_manager as rm_mod # noqa: E402
218218

219219
monkeypatch.setattr(rm_mod.time, "time", lambda: 999.0)
220220

0 commit comments

Comments
 (0)