3 new revisions:

Revision: 2a7db73e24e6
Branch:   default
Author:   Pekka Klärck
Date:     Tue Aug 27 13:17:19 2013 UTC
Log:      Fixed API doc related to Keyword.message
http://code.google.com/p/robotframework/source/detail?r=2a7db73e24e6

Revision: cc51f5c10184
Branch:   default
Author:   Pekka Klärck
Date:     Tue Aug 27 13:18:31 2013 UTC
Log:      import and indentation fixes
http://code.google.com/p/robotframework/source/detail?r=cc51f5c10184

Revision: 436267bc9b42
Branch:   default
Author:   Pekka Klärck
Date:     Tue Aug 27 13:29:05 2013 UTC
Log: Refactored XML element handling. Algorithm is now symmetric and easier...
http://code.google.com/p/robotframework/source/detail?r=436267bc9b42

==============================================================================
Revision: 2a7db73e24e6
Branch:   default
Author:   Pekka Klärck
Date:     Tue Aug 27 13:17:19 2013 UTC
Log:      Fixed API doc related to Keyword.message
http://code.google.com/p/robotframework/source/detail?r=2a7db73e24e6

Modified:
 /src/robot/result/keyword.py

=======================================
--- /src/robot/result/keyword.py        Tue Jun 11 11:48:21 2013 UTC
+++ /src/robot/result/keyword.py        Tue Aug 27 13:17:19 2013 UTC
@@ -31,8 +31,8 @@
         self.starttime = starttime
         #: Keyword execution end time in format ``%Y%m%d %H:%M:%S.%f``.
         self.endtime = endtime
-        #: Log messages, a list of :class:`~.message.Message`
-        #: instances. Only used with suite teardowns.
+        #: Keyword status message. Used only with suite teardowns.
+        #: A non-empty message means that the teardown has failed.
         self.message = ''

     @property

==============================================================================
Revision: cc51f5c10184
Branch:   default
Author:   Pekka Klärck
Date:     Tue Aug 27 13:18:31 2013 UTC
Log:      import and indentation fixes
http://code.google.com/p/robotframework/source/detail?r=cc51f5c10184

Modified:
 /src/robot/model/keyword.py

=======================================
--- /src/robot/model/keyword.py Tue Jun 11 11:48:21 2013 UTC
+++ /src/robot/model/keyword.py Tue Aug 27 13:18:31 2013 UTC
@@ -14,9 +14,9 @@

 from robot.utils import setter

-from itemlist import ItemList
-from message import Message, Messages
-from modelobject import ModelObject
+from .itemlist import ItemList
+from .message import Message, Messages
+from .modelobject import ModelObject


 class Keyword(ModelObject):
@@ -42,7 +42,7 @@
         self.args = args
         #: 'SETUP', 'TEARDOWN' or 'KW'.
         self.type = type
-          #: Keyword timeout.
+        #: Keyword timeout.
         self.timeout = timeout
         #: Keyword messages, a list of
         #: :class:`~robot.model.message.Messages` instances.

==============================================================================
Revision: 436267bc9b42
Branch:   default
Author:   Pekka Klärck
Date:     Tue Aug 27 13:29:05 2013 UTC
Log: Refactored XML element handling. Algorithm is now symmetric and easier to understand. Also error message as proper English.
http://code.google.com/p/robotframework/source/detail?r=436267bc9b42

Modified:
 /atest/robot/cli/rebot/invalid_usage.txt
 /atest/robot/cli/runner/runfailed_corners.txt
 /src/robot/result/xmlelementhandlers.py

=======================================
--- /atest/robot/cli/rebot/invalid_usage.txt    Thu May 30 14:48:32 2013 UTC
+++ /atest/robot/cli/rebot/invalid_usage.txt    Tue Aug 27 13:29:05 2013 UTC
@@ -33,7 +33,7 @@

 Incompatible XML
     Create File  ${MYOUTDIR}/invalid.xml  <not><our>type</our></not>
- Rebot should fail ${MYOUTDIR}${/}invalid.xml Reading XML source '.*invalid.xml' failed: Incompatible XML element 'not' + Rebot should fail ${MYOUTDIR}${/}invalid.xml Reading XML source '.*invalid.xml' failed: Incompatible XML element 'not'.

 Invalid Output Directory
     Create File  ${MYOUTDIR}${/}not-dir
=======================================
--- /atest/robot/cli/runner/runfailed_corners.txt Fri May 31 07:20:43 2013 UTC +++ /atest/robot/cli/runner/runfailed_corners.txt Tue Aug 27 13:29:05 2013 UTC
@@ -37,7 +37,7 @@
     Stderr Should Be Equal To
... [ ERROR ] Collecting failed tests from '${RUN FAILED FROM}' failed:
     ...  Reading XML source '${RUN FAILED FROM}' failed:
-    ...  Incompatible XML element 'xml'${USAGE TIP}\n
+    ...  Incompatible XML element 'xml'.${USAGE TIP}\n

 *** Keywords ***
 Generate Output
=======================================
--- /src/robot/result/xmlelementhandlers.py     Thu Jun  6 14:00:44 2013 UTC
+++ /src/robot/result/xmlelementhandlers.py     Tue Aug 27 13:29:05 2013 UTC
@@ -18,31 +18,32 @@
 class XmlElementHandler(object):

     def __init__(self, execution_result, root_handler=None):
-        self._stack = [(execution_result, root_handler or RootHandler())]
+        self._stack = [(root_handler or RootHandler(), execution_result)]

     def start(self, elem):
-        result, handler = self._stack[-1]
-        self._stack.append(handler.handle_child(elem, result))
+        handler, result = self._stack[-1]
+        handler = handler.get_child_handler(elem)
+        result = handler.start(elem, result)
+        self._stack.append((handler, result))

     def end(self, elem):
-        result, handler = self._stack.pop()
+        handler, result = self._stack.pop()
         handler.end(elem, result)


 class _Handler(object):

     def __init__(self):
-        self._child_map = dict((c.tag, c) for c in self._children())
+        self._child_handlers = dict((c.tag, c) for c in self._children())

     def _children(self):
         return []

-    def handle_child(self, elem, result):
+    def get_child_handler(self, elem):
         try:
-            handler = self._child_map[elem.tag]
+            return self._child_handlers[elem.tag]
         except KeyError:
-            raise DataError("Incompatible XML element '%s'" % elem.tag)
-        return handler.start(elem, result), handler
+            raise DataError("Incompatible XML element '%s'." % elem.tag)

     def start(self, elem, result):
         return result
@@ -230,5 +231,5 @@
 class StatisticsHandler(_Handler):
     tag = 'statistics'

-    def handle_child(self, elem, result):
-        return result, self
+    def get_child_handler(self, elem):
+        return self

--

--- You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to robotframework-commit+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to