Mock robots (WIP segmentation fault)

This commit is contained in:
Remi Cadene
2024-09-12 01:43:32 +02:00
parent 4151630c24
commit 53ebf9cf9f
3 changed files with 28 additions and 6 deletions

View File

@@ -197,6 +197,13 @@ def require_robot(func):
mock_cameras(request)
mock_motors(request)
def mock_input(text):
print(text)
monkeypatch = request.getfixturevalue("monkeypatch")
# To run calibration without user input
monkeypatch.setattr("builtins.input", mock_input)
# Run test with a real robot. Skip test if robot connection fails.
else:
# `is_robot_available` is defined in `tests/conftest.py`