automat
automat copied to clipboard
Self-service finite-state machines for the programmer on the go.
Automat should have a test helper that asserts *all* transitions occurred. It might go a little something like this: ```python tracer = TraceAllTransitions() someMachineInstance.traceWith(tracer) # testing intensifies assertHasAllTransitions(tracer, for_=SomeMachine) ```...
Today you can do `machine.state(initial=True)` to mark the initial state of a machine. In tinkering with automat today, I've got a machine that has some explicit end states, and it...
hey @hawkowl. what's up
For libraries that wish to use Automat to export public objects, mostly, the fact that Automat is used is an implementation detail. However, any invalid transitions raise an Automat-specific error...
Automat should have a test helper that asserts a given transition occurred after running a block of code. It might go a little something like this: ```python with assertTransitioned(someMachineInstance, through=[SomeMachine.state1,...
Unfortunately, our world is filled with side-effects which are out of our control and can result in errors. Based on a short chat with @glyph exceptions occurring when executing outputs...
Per @moshez's suggestion: The `collector` callable passed to `upon` runs on a generator of outputs. That means replacing it with `next`, as suggested by the docs, for a transition that...
this should be an error; cite http://www.erights.org/data/serial/jhu-paper/upgrade.html
perhaps the same tool in #5 - often it's useful to see "in what states is input X invalid" so we can provide more cases that will be covered
The docs are correct in source, but incorrect on web  