Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/sugar/tutorius/tests/linear_creatortests.py
diff options
context:
space:
mode:
authorVincent Vinet <vince.vinet@gmail.com>2009-03-31 16:59:10 (GMT)
committer Vincent Vinet <vince.vinet@gmail.com>2009-04-02 15:13:50 (GMT)
commit1bc406d0fb8704a7a71dcdf52f54dc6f5b4e5921 (patch)
treed1f8ed17da95b38eb0a3eaae58a210a519b363c3 /src/sugar/tutorius/tests/linear_creatortests.py
parent7f030fd302c0be7ca7dc38863e1d9250df00ca31 (diff)
Ajout de tests
Diffstat (limited to 'src/sugar/tutorius/tests/linear_creatortests.py')
-rw-r--r--src/sugar/tutorius/tests/linear_creatortests.py16
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()