From 5e53e6bd2f94e76da6dcdda3768c93be94638b58 Mon Sep 17 00:00:00 2001 From: CarolinePascal Date: Fri, 22 May 2026 13:09:56 +0200 Subject: [PATCH] tests(typos): fixing typos in tests --- src/lerobot/datasets/dataset_tools.py | 6 +++--- tests/datasets/test_datasets.py | 7 ++++++- tests/datasets/test_image_writer.py | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/lerobot/datasets/dataset_tools.py b/src/lerobot/datasets/dataset_tools.py index 489914fbc..b215b6fdd 100644 --- a/src/lerobot/datasets/dataset_tools.py +++ b/src/lerobot/datasets/dataset_tools.py @@ -1329,7 +1329,7 @@ def _estimate_frame_size_via_calibration( imgs_dir=calibration_dir, video_path=calibration_video_path, fps=fps, - camera_encoder=camera_encoder, + video_encoder=camera_encoder, overwrite=True, ) @@ -1813,7 +1813,7 @@ def convert_image_to_video_dataset( imgs_dir=imgs_dir, video_path=video_path, fps=fps, - camera_encoder=camera_encoder, + video_encoder=camera_encoder, overwrite=True, ) @@ -1860,7 +1860,7 @@ def convert_image_to_video_dataset( video_key=img_key, chunk_index=0, file_index=0 ) new_meta.info.features[img_key]["info"] = get_video_info( - video_path, camera_encoder=camera_encoder + video_path, video_encoder=camera_encoder ) write_info(new_meta.info, new_meta.root) diff --git a/tests/datasets/test_datasets.py b/tests/datasets/test_datasets.py index ba9b64812..2e7a935f0 100644 --- a/tests/datasets/test_datasets.py +++ b/tests/datasets/test_datasets.py @@ -1480,10 +1480,15 @@ def test_valid_video_codecs_constant(): assert "h264" in VALID_VIDEO_CODECS assert "hevc" in VALID_VIDEO_CODECS assert "libsvtav1" in VALID_VIDEO_CODECS + assert "ffv1" in VALID_VIDEO_CODECS assert "auto" in VALID_VIDEO_CODECS assert "h264_videotoolbox" in VALID_VIDEO_CODECS assert "h264_nvenc" in VALID_VIDEO_CODECS - assert len(VALID_VIDEO_CODECS) == 10 + assert "h264_vaapi" in VALID_VIDEO_CODECS + assert "h264_qsv" in VALID_VIDEO_CODECS + assert "hevc_videotoolbox" in VALID_VIDEO_CODECS + assert "hevc_nvenc" in VALID_VIDEO_CODECS + assert len(VALID_VIDEO_CODECS) == 11 def test_delta_timestamps_with_episodes_filter(tmp_path, empty_lerobot_dataset_factory): diff --git a/tests/datasets/test_image_writer.py b/tests/datasets/test_image_writer.py index 916b8f017..348291c9c 100644 --- a/tests/datasets/test_image_writer.py +++ b/tests/datasets/test_image_writer.py @@ -94,7 +94,7 @@ def test_image_array_to_pil_image_pytorch_format(img_array_factory): def test_image_array_to_pil_image_single_channel(img_array_factory): img_array = img_array_factory(channels=1) - with pytest.raises(NotImplementedError): + with pytest.raises(ValueError, match="Unsupported single-channel image dtype"): image_array_to_pil_image(img_array)