Closed Pathfinder216 closed 4 years ago
Hi @Pathfinder216,
I can confirm this bug with Machine
in version 0.8.1. I added your case to the core tests and pushed a fix. Thank you for taking the time to file such an informative issue. Much appreciated!
I defined an IntEnum that I'm using as the states. It has a member with value 0. When defining the transitions, I can't use that member as a destination. I can, however, get it to work by using a string of the enumeration name.
Minimal example:
Making any one (or more) of the following changes causes it to work fine and not raise an
AssertionError
:State.FOO
to anything other than0
IntEnum
toEnum
I setup logging to the console to see what was going on. I noticed the following message:
DEBUG:transitions.core:Initiating transition from state BAR to state None...