pytransitions / transitions

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

HierarchicalMachine.to_state() now works with enumerations #427

Closed thedrow closed 4 years ago

thedrow commented 4 years ago

It is sometimes useful to use to_state() when testing even if we don't have special separator characters. Therefor, this method should work with enumerations as states as well.

thedrow commented 4 years ago

This PR still lacks tests.

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-0.3%) to 98.224% when pulling 1b46cd8357626e7782391430957a51fb2ba2953f on thedrow:patch-3 into f7cc995c4e088974d49371d9583d9bcb3f2a731d on pytransitions:master.