refactor(tests): remove grpc import checks from test files for cleaner code

This commit is contained in:
Khalil Meftah
2026-04-27 16:20:13 +02:00
parent 47be90f040
commit 577f14337a
8 changed files with 13 additions and 38 deletions
-4
View File
@@ -13,10 +13,6 @@
# limitations under the License.
"""Tests for RL data mixing (DataMixer, OnlineOfflineMixer)."""
import pytest
pytest.importorskip("grpc")
import torch
from lerobot.rl.buffer import ReplayBuffer
-4
View File
@@ -18,10 +18,6 @@ import threading
import time
from queue import Queue
import pytest
pytest.importorskip("grpc")
from torch.multiprocessing import Queue as TorchMPQueue
from lerobot.rl.queue import get_last_item_from_queue
+1 -4
View File
@@ -16,9 +16,6 @@
"""Tests for the RL algorithm abstraction and SACAlgorithm implementation."""
import pytest
pytest.importorskip("grpc")
import torch
from lerobot.configs.types import FeatureType, PolicyFeature
@@ -31,7 +28,7 @@ from lerobot.utils.constants import ACTION, OBS_IMAGE, OBS_STATE
from lerobot.utils.random_utils import set_seed
# ---------------------------------------------------------------------------
# Helpers (reuse patterns from tests/policies/test_sac_policy.py)
# Helpers (reuse patterns from tests/policies/test_gaussian_actor_policy.py)
# ---------------------------------------------------------------------------
-4
View File
@@ -14,10 +14,6 @@
# 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