Skip to content

Commit

Permalink
Remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
aliberts committed Nov 28, 2024
1 parent 82ff776 commit ea5009e
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions tests/test_control_robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,24 +295,12 @@ def test_resume_record(tmpdir, request, robot_type, mock):
dataset = record(**record_kwargs)
assert len(dataset) == 1, f"`dataset` should contain 1 frame, not {len(dataset)}"

# init_dataset_return_value = {}

# def wrapped_init_dataset(*args, **kwargs):
# nonlocal init_dataset_return_value
# init_dataset_return_value = init_dataset(*args, **kwargs)
# return init_dataset_return_value

# with patch("lerobot.scripts.control_robot.init_dataset", wraps=wrapped_init_dataset):

with pytest.raises(FileExistsError):
# Dataset already exists, but resume=False by default
record(**record_kwargs)

dataset = record(**record_kwargs, resume=True)
assert len(dataset) == 2, f"`dataset` should contain 2 frames, not {len(dataset)}"
# assert (
# init_dataset_return_value["num_episodes"] == 2
# ), "`init_dataset` should load the previous episode"


@pytest.mark.parametrize("robot_type, mock", [("koch", True)])
Expand Down

0 comments on commit ea5009e

Please sign in to comment.