From 5494faf096e611a10056813e45c31189fc518578 Mon Sep 17 00:00:00 2001 From: Remi Cadene Date: Thu, 11 Jul 2024 00:24:58 +0200 Subject: [PATCH] fix unit tests (minimal) --- tests/test_motors.py | 4 +++- tests/test_robots.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_motors.py b/tests/test_motors.py index 9d8e7e0fd..87c000f5f 100644 --- a/tests/test_motors.py +++ b/tests/test_motors.py @@ -3,7 +3,6 @@ import time import numpy as np import pytest -from lerobot.common.robot_devices.motors.dynamixel import DynamixelMotorsBus, find_port from lerobot.common.robot_devices.utils import RobotDeviceAlreadyConnectedError, RobotDeviceNotConnectedError from tests.utils import require_koch @@ -14,6 +13,7 @@ def test_motors_bus(request): # TODO(rcadene): test logs # TODO(rcadene): test calibration # TODO(rcadene): add compatibility with other motors bus + from lerobot.common.robot_devices.motors.dynamixel import DynamixelMotorsBus # Test instantiating a common motors structure. # Here the one from Alexander Koch follower arm. @@ -87,4 +87,6 @@ def test_motors_bus(request): @require_koch def test_find_port(request): + from lerobot.common.robot_devices.motors.dynamixel import find_port + find_port() diff --git a/tests/test_robots.py b/tests/test_robots.py index b1afc066b..6827c7e00 100644 --- a/tests/test_robots.py +++ b/tests/test_robots.py @@ -5,7 +5,6 @@ import pytest import torch from lerobot.common.robot_devices.robots.factory import make_robot -from lerobot.common.robot_devices.robots.koch import KochRobot from lerobot.common.robot_devices.utils import RobotDeviceAlreadyConnectedError, RobotDeviceNotConnectedError from tests.utils import require_koch @@ -15,6 +14,7 @@ def test_robot(tmpdir, request): # TODO(rcadene): measure fps in nightly? # TODO(rcadene): test logs # TODO(rcadene): add compatibility with other robots + from lerobot.common.robot_devices.robots.koch import KochRobot # Save calibration preset calibration = {