Skip to content

Commit c48e082

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 67ba423 commit c48e082

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
@@ -324,7 +324,7 @@ def _fake_start_all(self, recording, active_cams, current_frames, **kwargs):
324324
run_dir.mkdir(parents=True, exist_ok=True)
325325
return run_dir
326326

327-
from dlclivegui.gui import recording_manager as rm_mod
327+
from dlclivegui.services import recording_manager as rm_mod
328328

329329
monkeypatch.setattr(rm_mod.RecordingManager, "start_all", _fake_start_all)
330330
return calls
@@ -408,7 +408,7 @@ def recording_settings(app_config_two_cams):
408408

409409
@pytest.fixture
410410
def patch_video_recorder(monkeypatch):
411-
import dlclivegui.gui.recording_manager as rm_mod
411+
import dlclivegui.services.recording_manager as rm_mod
412412

413413
monkeypatch.setattr(rm_mod, "VideoRecorder", FakeVideoRecorder)
414414
return FakeVideoRecorder
@@ -427,7 +427,7 @@ def _fake_write_frame(cam_id, frame, timestamp=None):
427427

428428
@pytest.fixture
429429
def patch_build_run_dir(monkeypatch, tmp_path):
430-
import dlclivegui.gui.recording_manager as rm_mod
430+
import dlclivegui.services.recording_manager as rm_mod
431431

432432
spy = {"session_dir": None, "use_timestamp": None}
433433
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

1111

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

216-
import dlclivegui.gui.recording_manager as rm_mod # noqa: E402
216+
import dlclivegui.services.recording_manager as rm_mod # noqa: E402
217217

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

0 commit comments

Comments
 (0)