Skip tests if alexander koch robot is not available
This commit is contained in:
@@ -3,6 +3,7 @@ import pytest
|
||||
|
||||
from lerobot.common.robot_devices.cameras.opencv import OpenCVCamera, save_images_from_cameras
|
||||
from lerobot.common.robot_devices.utils import RobotDeviceAlreadyConnectedError, RobotDeviceNotConnectedError
|
||||
from tests.utils import require_koch
|
||||
|
||||
CAMERA_INDEX = 2
|
||||
# Maximum absolute difference between two consecutive images recored by a camera.
|
||||
@@ -14,7 +15,8 @@ def compute_max_pixel_difference(first_image, second_image):
|
||||
return np.abs(first_image.astype(float) - second_image.astype(float)).max()
|
||||
|
||||
|
||||
def test_camera():
|
||||
@require_koch
|
||||
def test_camera(request):
|
||||
"""Test assumes that `camera.read()` returns the same image when called multiple times in a row.
|
||||
So the environment should not change (you shouldnt be in front of the camera) and the camera should not be moving.
|
||||
|
||||
@@ -118,5 +120,6 @@ def test_camera():
|
||||
del camera
|
||||
|
||||
|
||||
def test_save_images_from_cameras(tmpdir):
|
||||
@require_koch
|
||||
def test_save_images_from_cameras(tmpdir, request):
|
||||
save_images_from_cameras(tmpdir, record_time_s=1)
|
||||
|
||||
Reference in New Issue
Block a user