diff options
author | Jean-Christophe Savard <savard.jean.christophe@gmail.com> | 2009-04-20 13:37:10 (GMT) |
---|---|---|
committer | Jean-Christophe Savard <savard.jean.christophe@gmail.com> | 2009-04-20 13:37:10 (GMT) |
commit | b608e101ad903a28fbb3266420c44037620a99a0 (patch) | |
tree | d778492871f300181ca43a8b908581819dcf777e | |
parent | ffaa84c5c20110ea0461fa2096cb66f71b3e84e6 (diff) |
ctrl-z sur bundler.py
-rw-r--r-- | src/sugar/tutorius/tests/coretests.py | 2 | ||||
-rw-r--r-- | src/sugar/tutorius/tests/serializertests.py | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/sugar/tutorius/tests/coretests.py b/src/sugar/tutorius/tests/coretests.py index 91f03fa..5f91a64 100644 --- a/src/sugar/tutorius/tests/coretests.py +++ b/src/sugar/tutorius/tests/coretests.py @@ -29,7 +29,7 @@ and event filters. Those are in their separate test module import unittest import logging -from sugar.tutorius.actions import Action, ClickAction, TypeTextActionz +from sugar.tutorius.actions import Action, ClickAction, TypeTextAction from sugar.tutorius.core import * from sugar.tutorius.filters import * diff --git a/src/sugar/tutorius/tests/serializertests.py b/src/sugar/tutorius/tests/serializertests.py index 12e7ab8..64e467e 100644 --- a/src/sugar/tutorius/tests/serializertests.py +++ b/src/sugar/tutorius/tests/serializertests.py @@ -68,7 +68,7 @@ class XMLSerializerTest(unittest.TestCase): """ Writes an FSM to disk, then compares the file to the expected results. """ - # Make the class believe the test is in a activity path + # Make the serializer believe the test is in a activity path testpath = "/tmp/testdata/" os.environ["SUGAR_BUNDLE_PATH"] = testpath os.environ["SUGAR_PREFIX"] = testpath @@ -80,6 +80,7 @@ class XMLSerializerTest(unittest.TestCase): # Compare the two files + #Remove test file and path (commented for testing, to uncomment) ## os.remove(testpath + os.path.join(sugar.tutorius.bundler._get_store_root(), str(self.uuid)) + "/fsm.xml") ## os.removedirs(testpath) @@ -98,6 +99,10 @@ class XMLSerializerTest(unittest.TestCase): loaded_fsm = xml_ser.load_fsm(str(self.uuid)) # Compare the two FSMs + assert loaded_fsm._states.get("INIT").name == self.fsm._states.get("INIT").name, \ + 'FSM underlying dictionary differ from original to pickled/reformed one' + assert loaded_fsm._states.get("LOST").name == self.fsm._states.get("Second").name, \ + 'FSM underlying dictionary differ from original to pickled/reformed one' # Helper classes to help testing class SerializerTest(unittest.TestCase): |