From f72cb15d47a1844218aed65826dfae9919e8f688 Mon Sep 17 00:00:00 2001 From: mike Date: Tue, 10 Mar 2009 18:56:30 +0000 Subject: TutoriusV1 : Adding a sample usage case tests for FSM --- (limited to 'src/sugar/tutorius/core.py') 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""" -- cgit v0.9.1