fix: skip tests that require grpc if not available

This commit is contained in:
Khalil Meftah
2026-04-15 15:18:04 +02:00
parent c88cf979f1
commit 7a1c9e74c3
4 changed files with 14 additions and 0 deletions
+3
View File
@@ -15,6 +15,9 @@
# limitations under the License. # limitations under the License.
import pytest import pytest
pytest.importorskip("grpc")
import torch import torch
from torch import Tensor, nn from torch import Tensor, nn
+4
View File
@@ -13,6 +13,10 @@
# limitations under the License. # limitations under the License.
"""Tests for RL data mixing (DataMixer, OnlineOfflineMixer).""" """Tests for RL data mixing (DataMixer, OnlineOfflineMixer)."""
import pytest
pytest.importorskip("grpc")
import torch import torch
from lerobot.rl.buffer import ReplayBuffer from lerobot.rl.buffer import ReplayBuffer
+3
View File
@@ -16,6 +16,9 @@
"""Tests for the RL algorithm abstraction and SACAlgorithm implementation.""" """Tests for the RL algorithm abstraction and SACAlgorithm implementation."""
import pytest import pytest
pytest.importorskip("grpc")
import torch import torch
from lerobot.configs.types import FeatureType, PolicyFeature from lerobot.configs.types import FeatureType, PolicyFeature
+4
View File
@@ -14,6 +14,10 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import pytest
pytest.importorskip("grpc")
import torch import torch
from torch import Tensor from torch import Tensor