fix statemachine

- fix: calling state.start(<new state>) on restart must ensure
  that the function <new state> is called before state.start()
  returns.
- modify slighly behaviour of cleanup function

Change-Id: I483a3aefa6af4712b3cf13f62c86d4c06edd1d8d
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/28020
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
2022-03-28 15:14:31 +02:00
committed by l_samenv
parent 9152ea1d26
commit d5924567da
3 changed files with 123 additions and 83 deletions

View File

@ -112,7 +112,7 @@ def test_stop():
s.cycle()
s.stop()
s.cycle()
assert isinstance(s.last_error, Stop)
assert s.last_error is Stop
assert s.state is None