From 63bbf092a0b8b8db7263cc6411788ee2a5c13db7 Mon Sep 17 00:00:00 2001 From: CarolinePascal Date: Tue, 12 May 2026 17:23:18 +0200 Subject: [PATCH] test(factories): updating factories --- tests/fixtures/constants.py | 14 ++++++++++---- tests/fixtures/dataset_factories.py | 5 +---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/tests/fixtures/constants.py b/tests/fixtures/constants.py index 35d8776ce..4d578b503 100644 --- a/tests/fixtures/constants.py +++ b/tests/fixtures/constants.py @@ -28,17 +28,23 @@ DUMMY_MOTOR_FEATURES = { "names": ["shoulder_pan", "shoulder_lift", "elbow_flex", "wrist_flex", "wrist_roll", "gripper"], }, } -DUMMY_CAMERA_FEATURES = { - "laptop": {"shape": (64, 96, 3), "names": ["height", "width", "channels"], "info": None}, - "phone": {"shape": (64, 96, 3), "names": ["height", "width", "channels"], "info": None}, -} DEFAULT_FPS = 30 DUMMY_VIDEO_INFO = { "video.fps": DEFAULT_FPS, "video.codec": "av1", "video.pix_fmt": "yuv420p", + "video.video_backend": "pyav", + "video.extra_options": {}, + "video.g": 2, + "video.crf": 30, + "video.preset": 12, + "video.fast_decode": 0, "video.is_depth_map": False, "has_audio": False, } +DUMMY_CAMERA_FEATURES = { + "laptop": {"shape": (64, 96, 3), "names": ["height", "width", "channels"], "info": DUMMY_VIDEO_INFO}, + "phone": {"shape": (64, 96, 3), "names": ["height", "width", "channels"], "info": DUMMY_VIDEO_INFO}, +} DUMMY_CHW = (3, 96, 128) DUMMY_HWC = (96, 128, 3) diff --git a/tests/fixtures/dataset_factories.py b/tests/fixtures/dataset_factories.py index 48128a8d0..a6e349778 100644 --- a/tests/fixtures/dataset_factories.py +++ b/tests/fixtures/dataset_factories.py @@ -46,7 +46,6 @@ from tests.fixtures.constants import ( DUMMY_MOTOR_FEATURES, DUMMY_REPO_ID, DUMMY_ROBOT_TYPE, - DUMMY_VIDEO_INFO, ) @@ -134,9 +133,7 @@ def features_factory(): use_videos: bool = True, ) -> dict: if use_videos: - camera_ft = { - key: {"dtype": "video", **ft, **DUMMY_VIDEO_INFO} for key, ft in camera_features.items() - } + camera_ft = {key: {"dtype": "video", **ft} for key, ft in camera_features.items()} else: camera_ft = {key: {"dtype": "image", **ft} for key, ft in camera_features.items()} return {