Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/sugar/tutorius/core.py
diff options
context:
space:
mode:
authormike <michael.jmontcalm@gmail.com>2009-03-10 18:56:30 (GMT)
committer mike <michael.jmontcalm@gmail.com>2009-03-10 18:56:30 (GMT)
commitf72cb15d47a1844218aed65826dfae9919e8f688 (patch)
tree982c5c9fb6205cf6d94befdc39a8084bac5abe94 /src/sugar/tutorius/core.py
parent510e50936c9fe10edf369e3e51fc5768cb6f3b96 (diff)
TutoriusV1 : Adding a sample usage case tests for FSM
Diffstat (limited to 'src/sugar/tutorius/core.py')
-rw-r--r--src/sugar/tutorius/core.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sugar/tutorius/core.py b/src/sugar/tutorius/core.py
index f817ba9..a699bbb 100644
--- a/src/sugar/tutorius/core.py
+++ b/src/sugar/tutorius/core.py
@@ -113,6 +113,8 @@ class State:
this state
@param tutorial The higher level container of the state
"""
+ self.name = name
+
self._actions = action_list
# Unused for now
@@ -257,8 +259,7 @@ class FiniteStateMachine(State):
state.set_tutorial(tutorial)
else:
raise RuntimeWarning(\
- "The FSM %s is already associated with a tutorial."%self.name\
- )
+ "The FSM %s is already associated with a tutorial."%self.name)
def setup(self):
"""
@@ -328,6 +329,9 @@ class FiniteStateMachine(State):
for action in self.actions:
action.undo()
+ # TODO : It might be nice to have a start() and stop() method for the
+ # FSM.
+
#Unused for now
## def verify(self):
## """Verify if the current state passes its tests"""