From 7a1c9e74c3b70d1ddb30f55c1ec6fb429d860d3c Mon Sep 17 00:00:00 2001 From: Khalil Meftah Date: Wed, 15 Apr 2026 15:18:04 +0200 Subject: [PATCH] fix: skip tests that require grpc if not available --- tests/policies/test_sac_policy.py | 3 +++ tests/rl/test_data_mixer.py | 4 ++++ tests/rl/test_sac_algorithm.py | 3 +++ tests/rl/test_trainer.py | 4 ++++ 4 files changed, 14 insertions(+) diff --git a/tests/policies/test_sac_policy.py b/tests/policies/test_sac_policy.py index 784ec2fc8..43544acf1 100644 --- a/tests/policies/test_sac_policy.py +++ b/tests/policies/test_sac_policy.py @@ -15,6 +15,9 @@ # limitations under the License. import pytest + +pytest.importorskip("grpc") + import torch from torch import Tensor, nn diff --git a/tests/rl/test_data_mixer.py b/tests/rl/test_data_mixer.py index 90e9e492f..113cb87c8 100644 --- a/tests/rl/test_data_mixer.py +++ b/tests/rl/test_data_mixer.py @@ -13,6 +13,10 @@ # limitations under the License. """Tests for RL data mixing (DataMixer, OnlineOfflineMixer).""" +import pytest + +pytest.importorskip("grpc") + import torch from lerobot.rl.buffer import ReplayBuffer diff --git a/tests/rl/test_sac_algorithm.py b/tests/rl/test_sac_algorithm.py index 325c9727b..6ef3e3ddf 100644 --- a/tests/rl/test_sac_algorithm.py +++ b/tests/rl/test_sac_algorithm.py @@ -16,6 +16,9 @@ """Tests for the RL algorithm abstraction and SACAlgorithm implementation.""" import pytest + +pytest.importorskip("grpc") + import torch from lerobot.configs.types import FeatureType, PolicyFeature diff --git a/tests/rl/test_trainer.py b/tests/rl/test_trainer.py index 47eaf6ad3..985ab9a6b 100644 --- a/tests/rl/test_trainer.py +++ b/tests/rl/test_trainer.py @@ -14,6 +14,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +import pytest + +pytest.importorskip("grpc") + import torch from torch import Tensor