Move imports
This commit is contained in:
parent
8d659a6aa9
commit
c85a9253e7
|
@ -3,6 +3,7 @@ from unittest.mock import patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
from lerobot.common.motors.dynamixel import DynamixelMotorsBus
|
||||||
from tests.mocks import mock_dynamixel_sdk
|
from tests.mocks import mock_dynamixel_sdk
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,15 +19,11 @@ def test_patch_sdk():
|
||||||
|
|
||||||
|
|
||||||
def test_abc_implementation():
|
def test_abc_implementation():
|
||||||
from lerobot.common.motors.dynamixel import DynamixelMotorsBus
|
|
||||||
|
|
||||||
# Instantiation should raise an error if the class doesn't implements abstract methods/properties
|
# Instantiation should raise an error if the class doesn't implements abstract methods/properties
|
||||||
DynamixelMotorsBus(port="/dev/dummy-port", motors={"dummy": (1, "xl330-m077")})
|
DynamixelMotorsBus(port="/dev/dummy-port", motors={"dummy": (1, "xl330-m077")})
|
||||||
|
|
||||||
|
|
||||||
def test_configure_motors_all_ids_1():
|
def test_configure_motors_all_ids_1():
|
||||||
from lerobot.common.motors.dynamixel import DynamixelMotorsBus
|
|
||||||
|
|
||||||
# see X_SERIES_BAUDRATE_TABLE
|
# see X_SERIES_BAUDRATE_TABLE
|
||||||
smaller_baudrate = 9_600
|
smaller_baudrate = 9_600
|
||||||
smaller_baudrate_value = 0
|
smaller_baudrate_value = 0
|
||||||
|
|
|
@ -3,6 +3,7 @@ from unittest.mock import patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
from lerobot.common.motors.feetech import FeetechMotorsBus
|
||||||
from tests.mocks import mock_scservo_sdk
|
from tests.mocks import mock_scservo_sdk
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,15 +19,11 @@ def test_patch_sdk():
|
||||||
|
|
||||||
|
|
||||||
def test_abc_implementation():
|
def test_abc_implementation():
|
||||||
from lerobot.common.motors.feetech import FeetechMotorsBus
|
|
||||||
|
|
||||||
# Instantiation should raise an error if the class doesn't implements abstract methods/properties
|
# Instantiation should raise an error if the class doesn't implements abstract methods/properties
|
||||||
FeetechMotorsBus(port="/dev/dummy-port", motors={"dummy": (1, "sts3215")})
|
FeetechMotorsBus(port="/dev/dummy-port", motors={"dummy": (1, "sts3215")})
|
||||||
|
|
||||||
|
|
||||||
def test_configure_motors_all_ids_1():
|
def test_configure_motors_all_ids_1():
|
||||||
from lerobot.common.motors.feetech import FeetechMotorsBus
|
|
||||||
|
|
||||||
# see SCS_SERIES_BAUDRATE_TABLE
|
# see SCS_SERIES_BAUDRATE_TABLE
|
||||||
smaller_baudrate = 19_200
|
smaller_baudrate = 19_200
|
||||||
smaller_baudrate_value = 7
|
smaller_baudrate_value = 7
|
||||||
|
|
Loading…
Reference in New Issue