-
-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test helper that asserts all transitions occurred #38
Comments
(Per @tomprince) |
At dinner tonight, @markrwilliams and I came up with some ideas:
Then standard set-intersection tests can be used to decide if the right transitions have been exercised. You could merge the traces of multiple context managers to look at combined coverage, or you could use class Foo(object):
m = MethodicalMachine()
...
f = Foo()
with gather_transitions(f.m) as edges:
f.trigger_stuff()
assert edges.all_transitions() == Foo.m.all_transitions() (the difference between a machine instance, like This also avoids the need to be able to name specific transitions, since the sets contain opaque objects (one per transition). This would let us continue to keep the tracing function private, and these opaque objects would be the strings or tuples that the tracing function provides. #37 would, of course, need a way to name these things. Other questions:
|
Automat should have a test helper that asserts all transitions occurred.
It might go a little something like this:
...where the tracer stuff would come from #36
The text was updated successfully, but these errors were encountered: