pytransitions / transitions

A lightweight, object-oriented finite state machine implementation in Python with many extensions
MIT License
5.49k stars 524 forks source link

Test coverage for resolving enums when tehy are set as nested initial states #516

Closed thedrow closed 3 years ago

thedrow commented 3 years ago

506 requires tests which were missing.

I need to write them and issue a PR.

aleneum commented 3 years ago

In 9061011, I rewrote HierarchicalMachine.add_states slightly to set NestedState.initial to (a list of) NestedState or Enum instead of (a list of) state names. See the added test in the commit. This should cover your PR as well.