From ab76b83f2f40b668c0d4332a432bbc107c50324d Mon Sep 17 00:00:00 2001 From: Nicolas Rabault Date: Mon, 29 Jun 2026 15:43:31 +0200 Subject: [PATCH] test(jobs): skip test_dataset if datasets extra is missing tests/jobs/test_dataset.py imports lerobot.jobs.dataset, which triggers the require_package("datasets") guard in lerobot/jobs/__init__.py at import time. Without lerobot[dataset] the module fails to collect in the base CI tier. Guard with importorskip, same as test_hf.py. --- tests/jobs/test_dataset.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/jobs/test_dataset.py b/tests/jobs/test_dataset.py index d45ac48aa..1f8b9b836 100644 --- a/tests/jobs/test_dataset.py +++ b/tests/jobs/test_dataset.py @@ -16,6 +16,8 @@ from unittest.mock import MagicMock import pytest +pytest.importorskip("datasets", reason="datasets is required (install lerobot[dataset])") + from lerobot.jobs.dataset import ensure_dataset_available