Commit 0cee1b75 authored by Jibril Mammeri's avatar Jibril Mammeri
Browse files

Add axis.name to AxisFaultError and its test

parent e8b82ce9
Pipeline #36695 passed with stages
in 87 minutes and 26 seconds
......@@ -1915,7 +1915,7 @@ class Axis:
f"{self.name}: {str(state)} at {self.position}"
)
elif state.FAULT:
raise AxisFaultError(str(state))
raise AxisFaultError(f"{self.name}: {str(state)}")
return state
gevent.sleep(polling_time)
......
......@@ -163,9 +163,10 @@ def test_fault_state(bad_motor):
bad_motor.controller.fault_state = True
with pytest.raises(AxisFaultError):
with pytest.raises(AxisFaultError) as excinfo:
bad_motor.wait_move()
assert bad_motor.name in str(excinfo.value)
bad_motor.controller.fault_state = False
bad_motor.move(0)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment