forked from tangger/lerobot
fix unit tests
This commit is contained in:
13
.github/workflows/test.yml
vendored
13
.github/workflows/test.yml
vendored
@@ -37,19 +37,6 @@ jobs:
|
|||||||
lfs: true # Ensure LFS files are pulled
|
lfs: true # Ensure LFS files are pulled
|
||||||
fetch-depth: 0 # Ensure the full history is fetched, not just the latest commit
|
fetch-depth: 0 # Ensure the full history is fetched, not just the latest commit
|
||||||
|
|
||||||
- name: Ensure required file is fetched
|
|
||||||
run: |
|
|
||||||
git fetch origin main
|
|
||||||
git checkout origin/main -- .cache/calibration/aloha_default
|
|
||||||
|
|
||||||
- name: Check if file exists
|
|
||||||
run: |
|
|
||||||
if [ -f .cache/calibration/aloha_default/right_follower.json ]; then
|
|
||||||
echo "File exists";
|
|
||||||
else
|
|
||||||
echo "File does not exist";
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Install apt dependencies
|
- name: Install apt dependencies
|
||||||
run: sudo apt-get update && sudo apt-get install -y libegl1-mesa-dev ffmpeg
|
run: sudo apt-get update && sudo apt-get install -y libegl1-mesa-dev ffmpeg
|
||||||
|
|
||||||
|
|||||||
@@ -49,11 +49,15 @@ def test_teleoperate(request, robot_type, mock):
|
|||||||
|
|
||||||
@pytest.mark.parametrize("robot_type, mock", TEST_ROBOT_TYPES)
|
@pytest.mark.parametrize("robot_type, mock", TEST_ROBOT_TYPES)
|
||||||
@require_robot
|
@require_robot
|
||||||
def test_calibrate(request, robot_type, mock):
|
def test_calibrate(tmpdir, request, robot_type, mock):
|
||||||
if mock:
|
if mock:
|
||||||
request.getfixturevalue("patch_builtins_input")
|
request.getfixturevalue("patch_builtins_input")
|
||||||
|
|
||||||
robot = make_robot(robot_type, mock=mock)
|
tmpdir = Path(tmpdir)
|
||||||
|
calibration_dir = tmpdir / robot_type
|
||||||
|
overrides_calibration_dir = [f"calibration_dir={calibration_dir}"]
|
||||||
|
|
||||||
|
robot = make_robot(robot_type, overrides=overrides_calibration_dir, mock=mock)
|
||||||
calibrate(robot, arms=get_available_arms(robot))
|
calibrate(robot, arms=get_available_arms(robot))
|
||||||
del robot
|
del robot
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user