From b608e101ad903a28fbb3266420c44037620a99a0 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Savard Date: Mon, 20 Apr 2009 13:37:10 +0000 Subject: ctrl-z sur bundler.py --- 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): -- cgit v0.9.1