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.
This commit is contained in:
Nicolas Rabault
2026-06-29 15:43:31 +02:00
parent 86959e3577
commit ab76b83f2f
+2
View File
@@ -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