diff options
author | Vincent Vinet <vince.vinet@gmail.com> | 2009-03-25 18:35:17 (GMT) |
---|---|---|
committer | Vincent Vinet <vince.vinet@gmail.com> | 2009-03-31 14:02:56 (GMT) |
commit | 6d5c55191f504357760267849c2524b3d8d64711 (patch) | |
tree | 6ad5e6a1d2d4ed05148450b98787cb8d32cda76a /src/sugar/tutorius/tests/linear_creatortests.py | |
parent | 18871f0d1b5eef4c6c3621e50a651f8760756ab6 (diff) |
Split action tests into own file, and add some testing
Diffstat (limited to 'src/sugar/tutorius/tests/linear_creatortests.py')
-rw-r--r-- | src/sugar/tutorius/tests/linear_creatortests.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/sugar/tutorius/tests/linear_creatortests.py b/src/sugar/tutorius/tests/linear_creatortests.py index 3bc06f9..f9ffbe7 100644 --- a/src/sugar/tutorius/tests/linear_creatortests.py +++ b/src/sugar/tutorius/tests/linear_creatortests.py @@ -19,8 +19,8 @@ from sugar.tutorius.core import * from sugar.tutorius.actions import * from sugar.tutorius.filters import * from sugar.tutorius.linear_creator import * -from coretests import TriggerEventFilter, CountAction - +from coretests import TriggerEventFilter +from actiontests import CountAction import unittest class CreatorTests(unittest.TestCase): @@ -64,6 +64,16 @@ class CreatorTests(unittest.TestCase): assert len(state2.get_action_list()) == 0, "Creator inserted extra actions on wrong state" assert len(state2.get_event_filter_list()) == 0, "Creator assigner events to the final state" + + creator.action(CountAction()) + + fsm = creator.generate_fsm() + + state2 = fsm.get_state_by_name("State2") + + assert len(state2.get_action_list()) == 1, "Creator did not add the action" + + assert len(state2.get_event_filter_list()) == 0, "Creator assigner events to the final state" if __name__ == '__main__': - unittest.main()
\ No newline at end of file + unittest.main() |