Fix unit test
This commit is contained in:
@@ -213,11 +213,8 @@ def require_robot(func):
|
||||
mock_cameras(request, camera_type)
|
||||
mock_motors(request)
|
||||
|
||||
def mock_input(text):
|
||||
print(text)
|
||||
|
||||
monkeypatch = request.getfixturevalue("monkeypatch")
|
||||
# To run calibration without user input
|
||||
monkeypatch = request.getfixturevalue("monkeypatch")
|
||||
monkeypatch.setattr("builtins.input", mock_input)
|
||||
|
||||
# Run test with a real robot. Skip test if robot connection fails.
|
||||
@@ -301,6 +298,11 @@ def require_motor(func):
|
||||
return wrapper
|
||||
|
||||
|
||||
def mock_input(text=None):
|
||||
if text is not None:
|
||||
print(text)
|
||||
|
||||
|
||||
def mock_cameras(request, camera_type="all"):
|
||||
# TODO(rcadene): Redesign the mocking tests
|
||||
monkeypatch = request.getfixturevalue("monkeypatch")
|
||||
|
||||
Reference in New Issue
Block a user