9 new revisions:

Revision: 30d2e2f063a6
Branch:   default
Author:   Pekka Klärck
Date:     Mon Dec 16 08:30:01 2013 UTC
Log:      Remote: Handle also nested binary results...
http://code.google.com/p/robotframework/source/detail?r=30d2e2f063a6

Revision: 825a66f4106b
Branch:   default
Author:   Pekka Klärck
Date:     Mon Dec 16 09:00:58 2013 UTC
Log:      remoteserver.py: handle binary arguments...
http://code.google.com/p/robotframework/source/detail?r=825a66f4106b

Revision: a3bb0084360a
Branch:   default
Author:   Pekka Klärck
Date:     Mon Dec 16 09:19:23 2013 UTC
Log:      remoteserver.py: handle binary return values and log messages...
http://code.google.com/p/robotframework/source/detail?r=a3bb0084360a

Revision: fe9250fe665c
Branch:   default
Author:   Pekka Klärck
Date:     Mon Dec 16 09:39:37 2013 UTC
Log:      whitespace
http://code.google.com/p/robotframework/source/detail?r=fe9250fe665c

Revision: 664a3b03ea89
Branch:   default
Author:   Pekka Klärck
Date:     Mon Dec 16 09:41:35 2013 UTC
Log: remote tests: DirectResultRemoteServer is generally useful and belongs...
http://code.google.com/p/robotframework/source/detail?r=664a3b03ea89

Revision: 7b8a363a6090
Branch:   default
Author:   Pekka Klärck
Date:     Mon Dec 16 10:06:17 2013 UTC
Log:      Remote: tests, and a small fix, for handling invalid servers
http://code.google.com/p/robotframework/source/detail?r=7b8a363a6090

Revision: b0a9ed7cd86c
Branch:   default
Author:   Pekka Klärck
Date:     Mon Dec 16 12:08:37 2013 UTC
Log:      remote tests: better suite name
http://code.google.com/p/robotframework/source/detail?r=b0a9ed7cd86c

Revision: 1280d5e8af06
Branch:   default
Author:   Pekka Klärck
Date:     Mon Dec 16 12:09:02 2013 UTC
Log:      remote: ironpython compatibility to code and tests
http://code.google.com/p/robotframework/source/detail?r=1280d5e8af06

Revision: 81cf4486bd60
Branch:   default
Author:   Pekka Klärck
Date:     Mon Dec 16 12:31:23 2013 UTC
Log:      fixed typo in suite name
http://code.google.com/p/robotframework/source/detail?r=81cf4486bd60

==============================================================================
Revision: 30d2e2f063a6
Branch:   default
Author:   Pekka Klärck
Date:     Mon Dec 16 08:30:01 2013 UTC
Log:      Remote: Handle also nested binary results

Update issue 1606
Handle also nested results.
http://code.google.com/p/robotframework/source/detail?r=30d2e2f063a6

Modified:
 /atest/robot/standard_libraries/remote/binary_result.txt
 /atest/testdata/standard_libraries/remote/binary_result.txt
 /atest/testdata/standard_libraries/remote/binaryresult.py
 /src/robot/libraries/Remote.py

=======================================
--- /atest/robot/standard_libraries/remote/binary_result.txt Sun Dec 15 00:27:17 2013 UTC +++ /atest/robot/standard_libraries/remote/binary_result.txt Mon Dec 16 08:30:01 2013 UTC
@@ -6,6 +6,15 @@
 *** Test Cases ***
 Returned
     Check Test Case    ${TESTNAME}
+
+Returned in list
+    Check Test Case    ${TESTNAME}
+
+Returned in dict
+    Check Test Case    ${TESTNAME}
+
+Returned in nested structure
+    Check Test Case    ${TESTNAME}

 Logged
     ${tc} =    Check Test Case    ${TESTNAME}
=======================================
--- /atest/testdata/standard_libraries/remote/binary_result.txt Sat Dec 14 23:01:53 2013 UTC +++ /atest/testdata/standard_libraries/remote/binary_result.txt Mon Dec 16 08:30:01 2013 UTC
@@ -11,7 +11,40 @@
     [Template]    Binary Should Be Returned Correctly
     \x00\x01\x02    0    1    2
     RF    82    70
+    \xe4\xff    228    255
     ${EMPTY}
+
+Returned in list
+    ${result} =    Return Binary List    0    1    82    255
+    Byte String Should Be Equal    ${result[0]}    \x00
+    Byte String Should Be Equal    ${result[1]}    \x01
+    Byte String Should Be Equal    ${result[2]}    R
+    Byte String Should Be Equal    ${result[3]}    \xff
+
+Returned in dict
+    ${result} =    Return Binary Dict    a=0    b=1    R=82    ff=255
+    Byte String Should Be Equal    ${result['a']}    \x00
+    Byte String Should Be Equal    ${result['b']}    \x01
+    Byte String Should Be Equal    ${result['R']}    R
+    Byte String Should Be Equal    ${result['ff']}    \xff
+
+Returned in nested structure
+    ${result} =    Return Nested Binary    0    1    c=2    R=82
+    Length Should Be    ${result}    3
+    Byte String Should Be Equal    ${result[0]}    \x00
+    Byte String Should Be Equal    ${result[1]}    \x01
+    Length Should Be    ${result[2]}    4
+    Byte String Should Be Equal    ${result[2]['c']}    \x02
+    Byte String Should Be Equal    ${result[2]['R']}    R
+    Length Should Be    ${result[2]['list']}    2
+    Byte String Should Be Equal    ${result[2]['list'][0]}    \x00
+    Byte String Should Be Equal    ${result[2]['list'][1]}    \x01
+    Length Should Be    ${result[2]['dict']}    3
+    Byte String Should Be Equal    ${result[2]['dict']['c']}    \x02
+    Byte String Should Be Equal    ${result[2]['dict']['R']}    R
+    Length Should Be    ${result[2]['dict']['list']}    2
+    Byte String Should Be Equal    ${result[2]['dict']['list'][0]}    \x00
+    Byte String Should Be Equal    ${result[2]['dict']['list'][1]}    \x01

 Logged
     [Template]    Log Binary
@@ -28,5 +61,10 @@
 Binary Should Be Returned Correctly
     [Arguments]    ${expected}    @{ordinals}
     ${result} =    Return Binary    @{ordinals}
-    Should Be Equal    ${result}    ${expected}
-    Should Be Byte String    ${result}
+    Byte String Should Be Equal    ${result}    ${expected}
+
+Byte String Should Be Equal
+    [Arguments]    ${bytes}    ${expected}
+    ${expected} =    Convert To Bytes    ${expected}
+    Should Be Equal    ${bytes}    ${expected}
+    Should Be Byte String    ${bytes}
=======================================
--- /atest/testdata/standard_libraries/remote/binaryresult.py Sat Dec 14 23:01:53 2013 UTC +++ /atest/testdata/standard_libraries/remote/binaryresult.py Mon Dec 16 08:30:01 2013 UTC
@@ -15,6 +15,21 @@
     def return_binary(self, *ordinals):
         return self._result(return_=self._binary(ordinals))

+    def return_binary_list(self, *ordinals):
+        return self._result(return_=[self._binary([o]) for o in ordinals])
+
+    def return_binary_dict(self, **ordinals):
+        ret = dict((k, self._binary([v])) for k, v in ordinals.items())
+        return self._result(return_=ret)
+
+    def return_nested_binary(self, *stuff, **more):
+        ret_list = [self._binary([o]) for o in stuff]
+        ret_dict = dict((k, self._binary([v])) for k, v in more.items())
+        ret_dict['list'] = ret_list[:]
+        ret_dict['dict'] = ret_dict.copy()
+        ret_list.append(ret_dict)
+        return self._result(return_=ret_list)
+
     def log_binary(self, *ordinals):
         return self._result(output=self._binary(ordinals))

=======================================
--- /src/robot/libraries/Remote.py      Thu Dec 12 22:19:07 2013 UTC
+++ /src/robot/libraries/Remote.py      Mon Dec 16 08:30:01 2013 UTC
@@ -125,8 +125,15 @@

     def _get(self, result, key):
         value = result.get(key, '')
+        return self._handle_binary(value)
+
+    def _handle_binary(self, value):
         if isinstance(value, xmlrpclib.Binary):
-            value = str(value)
+            return str(value)
+        if is_list_like(value):
+            return [self._handle_binary(v) for v in value]
+        if is_dict_like(value):
+ return dict((k, self._handle_binary(v)) for k, v in value.items())
         return value



==============================================================================
Revision: 825a66f4106b
Branch:   default
Author:   Pekka Klärck
Date:     Mon Dec 16 09:00:58 2013 UTC
Log:      remoteserver.py: handle binary arguments

Update issue 1606
remoteserver.py now handles binary arguments correctly (2a). This needs to be fixed also in the separate remote server project that will deprecate this version soon.
http://code.google.com/p/robotframework/source/detail?r=825a66f4106b

Modified:
 /tools/remoteserver/robotremoteserver.py
 /tools/remoteserver/test/atest/argument_types.txt
 /tools/remoteserver/test/libs/examplelib.py

=======================================
--- /tools/remoteserver/robotremoteserver.py    Wed Dec 11 18:49:51 2013 UTC
+++ /tools/remoteserver/robotremoteserver.py    Mon Dec 16 09:00:58 2013 UTC
@@ -17,6 +17,7 @@
 import traceback
 from StringIO import StringIO
 from SimpleXMLRPCServer import SimpleXMLRPCServer
+from xmlrpclib import Binary
 try:
     import signal
 except ImportError:
@@ -81,11 +82,12 @@
         return names + ['stop_remote_server']

     def run_keyword(self, name, args, kwargs=None):
+        args, kwargs = self._handle_binary_args(args, kwargs or {})
         result = {'status': 'PASS', 'return': '', 'output': '',
                   'error': '', 'traceback': ''}
         self._intercept_stdout()
         try:
-            return_value = self._get_keyword(name)(*args, **(kwargs or {}))
+            return_value = self._get_keyword(name)(*args, **kwargs)
         except:
             result['status'] = 'FAIL'
result['error'], result['traceback'] = self._get_error_details()
@@ -94,6 +96,14 @@
         result['output'] = self._restore_stdout()
         return result

+    def _handle_binary_args(self, args, kwargs):
+        args = [self._handle_binary(a) for a in args]
+ kwargs = dict([(k, self._handle_binary(v)) for k, v in kwargs.items()])
+        return args, kwargs
+
+    def _handle_binary(self, arg):
+        return arg if not isinstance(arg, Binary) else str(arg)
+
     def get_keyword_arguments(self, name):
         kw = self._get_keyword(name)
         if not kw:
=======================================
--- /tools/remoteserver/test/atest/argument_types.txt Fri Nov 29 13:33:49 2013 UTC +++ /tools/remoteserver/test/atest/argument_types.txt Mon Dec 16 09:00:58 2013 UTC
@@ -81,10 +81,9 @@
 Mapping As Argument
     Dictionary As Argument    ${MyMapping(one=1, spam='eggs')}

-Control Char As Argument
- [Documentation] In this situation the received error is not that good FAIL REGEXP: .*ExpatError.*
-    ${arg} =  Evaluate  '\\x01'
-    String As Argument  ${arg}
+Byte As Argument
+    Byte As Argument  0    \x00    byte=\x00
+    Byte As Argument  7    \x07    byte=\x07

 *** Keywords ***
 Argument Should Accepted
=======================================
--- /tools/remoteserver/test/libs/examplelib.py Fri Nov 29 13:33:49 2013 UTC
+++ /tools/remoteserver/test/libs/examplelib.py Mon Dec 16 09:00:58 2013 UTC
@@ -149,6 +149,11 @@
     def string_as_argument(self, arg):
         self._should_be_equal(arg, self.return_string())

+    def byte_as_argument(self, expected, arg, **kwargs):
+        expected = chr(int(expected))
+        self._should_be_equal(arg, expected)
+        self._should_be_equal(kwargs['byte'], expected)
+
     def unicode_string_as_argument(self, arg):
         self._should_be_equal(arg, self._unicode)


==============================================================================
Revision: a3bb0084360a
Branch:   default
Author:   Pekka Klärck
Date:     Mon Dec 16 09:19:23 2013 UTC
Log:      remoteserver.py: handle binary return values and log messages

Update issue 1606
remoteserver.py now handles binary return values and log messages (2b). Binary errors aren't handled, but the code doesn't seem to handle normal non-ASCII errors either. Fixing that can wait until we have the separate remote server project going on.
http://code.google.com/p/robotframework/source/detail?r=a3bb0084360a

Modified:
 /tools/remoteserver/robotremoteserver.py
 /tools/remoteserver/test/atest/logging.txt
 /tools/remoteserver/test/atest/return_values.txt
 /tools/remoteserver/test/libs/examplelib.py

=======================================
--- /tools/remoteserver/robotremoteserver.py    Mon Dec 16 09:00:58 2013 UTC
+++ /tools/remoteserver/robotremoteserver.py    Mon Dec 16 09:19:23 2013 UTC
@@ -12,6 +12,7 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.

+import re
 import sys
 import inspect
 import traceback
@@ -28,6 +29,9 @@
     Mapping = dict


+BINARY = re.compile('[\x00-\x08\x0B\x0C\x0E-\x1F]')
+
+
 class RobotRemoteServer(SimpleXMLRPCServer):
     allow_reuse_address = True

@@ -97,11 +101,11 @@
         return result

     def _handle_binary_args(self, args, kwargs):
-        args = [self._handle_binary(a) for a in args]
- kwargs = dict([(k, self._handle_binary(v)) for k, v in kwargs.items()])
+        args = [self._handle_binary_arg(a) for a in args]
+ kwargs = dict([(k, self._handle_binary_arg(v)) for k, v in kwargs.items()])
         return args, kwargs

-    def _handle_binary(self, arg):
+    def _handle_binary_arg(self, arg):
         return arg if not isinstance(arg, Binary) else str(arg)

     def get_keyword_arguments(self, name):
@@ -162,7 +166,9 @@
         return 'Traceback (most recent call last):\n' + trace

     def _handle_return_value(self, ret):
-        if isinstance(ret, (basestring, int, long, float)):
+        if isinstance(ret, basestring):
+            return self._handle_binary_result(ret)
+        if isinstance(ret, (int, long, float)):
             return ret
         if isinstance(ret, Mapping):
             return dict([(self._str(key), self._handle_return_value(value))
@@ -172,6 +178,15 @@
         except TypeError:
             return self._str(ret)

+    def _handle_binary_result(self, result):
+        if not BINARY.search(result):
+            return result
+        try:
+            result = str(result)
+        except UnicodeError:
+            raise ValueError("Cannot represent %r as binary." % result)
+        return Binary(result)
+
     def _str(self, item):
         if item is None:
             return ''
@@ -185,7 +200,7 @@
         output = sys.stdout.getvalue()
         sys.stdout.close()
         sys.stdout = sys.__stdout__
-        return output
+        return self._handle_binary_result(output)

     def _log(self, msg, level=None):
         if level:
=======================================
--- /tools/remoteserver/test/atest/logging.txt  Thu May 26 20:30:59 2011 UTC
+++ /tools/remoteserver/test/atest/logging.txt  Mon Dec 16 09:19:23 2013 UTC
@@ -40,7 +40,7 @@
     Should Be Equal  ${ret}  ${EMPTY}

 Log Control Char
- [Documentation] FAIL REGEXP: Processing XML-RPC return value failed. Most often this happens when the return value contains characters that are not valid in XML. Original error was: ExpatError: .*
+    [Documentation]  LOG 1 INFO 0: , 1:
     Log Control Char

 *** Keywords ***
=======================================
--- /tools/remoteserver/test/atest/return_values.txt Fri Nov 29 13:33:49 2013 UTC +++ /tools/remoteserver/test/atest/return_values.txt Mon Dec 16 09:19:23 2013 UTC
@@ -95,8 +95,7 @@
Return Value Should Be Return Mapping {'a': 1, '2': 'b', '': {'none': ''}}

 Return Control Char
- [Documentation] FAIL REGEXP: Processing XML-RPC return value failed. Most often this happens when the return value contains characters that are not valid in XML. Original error was: ExpatError: .*
-    Return Control Char
+    Return Value Should Be  Return Control Char  '\\x01'

 *** Keywords ***
 Return Value Should Be
=======================================
--- /tools/remoteserver/test/libs/examplelib.py Mon Dec 16 09:00:58 2013 UTC
+++ /tools/remoteserver/test/libs/examplelib.py Mon Dec 16 09:19:23 2013 UTC
@@ -63,7 +63,7 @@
         return 'Returned value'

     def log_control_char(self):
-        print '\x01'
+        print '0: \x01, 1: \x01'

     # Failures


==============================================================================
Revision: fe9250fe665c
Branch:   default
Author:   Pekka Klärck
Date:     Mon Dec 16 09:39:37 2013 UTC
Log:      whitespace
http://code.google.com/p/robotframework/source/detail?r=fe9250fe665c

Modified:
 /atest/testdata/standard_libraries/remote/simpleserver.py
 /src/robot/utils/islike.py

=======================================
--- /atest/testdata/standard_libraries/remote/simpleserver.py Sun Dec 15 00:27:17 2013 UTC +++ /atest/testdata/standard_libraries/remote/simpleserver.py Mon Dec 16 09:39:37 2013 UTC
@@ -3,6 +3,7 @@

 from remoteserver import announce_port

+
 class SimpleServer(SimpleXMLRPCServer):

     def __init__(self, port=8270, port_file=None):
=======================================
--- /src/robot/utils/islike.py  Mon Dec  2 22:54:02 2013 UTC
+++ /src/robot/utils/islike.py  Mon Dec 16 09:39:37 2013 UTC
@@ -30,6 +30,7 @@
     return (isinstance(item, (basestring, UserString)) or
             allow_java and isinstance(item, String))

+
 def is_list_like(item):
if is_str_like(item, allow_java=True) or is_dict_like(item, allow_java=True):
         return False

==============================================================================
Revision: 664a3b03ea89
Branch:   default
Author:   Pekka Klärck
Date:     Mon Dec 16 09:41:35 2013 UTC
Log: remote tests: DirectResultRemoteServer is generally useful and belongs to remoteserver
http://code.google.com/p/robotframework/source/detail?r=664a3b03ea89

Modified:
 /atest/testdata/standard_libraries/remote/binaryresult.py
 /atest/testdata/standard_libraries/remote/remoteserver.py

=======================================
--- /atest/testdata/standard_libraries/remote/binaryresult.py Mon Dec 16 08:30:01 2013 UTC +++ /atest/testdata/standard_libraries/remote/binaryresult.py Mon Dec 16 09:41:35 2013 UTC
@@ -1,13 +1,7 @@
 import sys
 from xmlrpclib import Binary

-from remoteserver import RemoteServer
-
-
-class DirectResultRemoteServer(RemoteServer):
-
-    def run_keyword(self, name, args, kwargs=None):
-        return getattr(self.library, name)(*args, **(kwargs or {}))
+from remoteserver import DirectResultRemoteServer


 class BinaryResult(object):
=======================================
--- /atest/testdata/standard_libraries/remote/remoteserver.py Sun Dec 15 00:27:17 2013 UTC +++ /atest/testdata/standard_libraries/remote/remoteserver.py Mon Dec 16 09:41:35 2013 UTC
@@ -38,6 +38,12 @@
         else:
             return {'status': 'PASS',
                     'return': result if result is not None else ''}
+
+
+class DirectResultRemoteServer(RemoteServer):
+
+    def run_keyword(self, name, args, kwargs=None):
+        return getattr(self.library, name)(*args, **(kwargs or {}))


 def announce_port(socket, port_file=None):

==============================================================================
Revision: 7b8a363a6090
Branch:   default
Author:   Pekka Klärck
Date:     Mon Dec 16 10:06:17 2013 UTC
Log:      Remote: tests, and a small fix, for handling invalid servers
http://code.google.com/p/robotframework/source/detail?r=7b8a363a6090

Added:
 /atest/robot/standard_libraries/remote/invalid.txt
 /atest/testdata/standard_libraries/remote/invalid.py
 /atest/testdata/standard_libraries/remote/invalid.txt
Modified:
 /atest/testdata/standard_libraries/remote/remoteserver.py
 /src/robot/libraries/Remote.py

=======================================
--- /dev/null
+++ /atest/robot/standard_libraries/remote/invalid.txt Mon Dec 16 10:06:17 2013 UTC
@@ -0,0 +1,20 @@
+*** Settings ***
+Suite Setup      Run Remote Tests    invalid.txt    invalid.py
+Force Tags       regression    pybot    jybot
+Resource         remote_resource.txt
+
+*** Test Cases ***
+Non dict result dict
+    Check Test Case    ${TESTNAME}
+
+Invalid result dict
+    Check Test Case    ${TESTNAME}
+
+Invalid char in XML
+    Check Test Case    ${TESTNAME}
+
+Exception
+    Check Test Case    ${TESTNAME}
+
+Broken connection
+    Check Test Case    ${TESTNAME}
=======================================
--- /dev/null
+++ /atest/testdata/standard_libraries/remote/invalid.py Mon Dec 16 10:06:17 2013 UTC
@@ -0,0 +1,24 @@
+import sys
+from remoteserver import DirectResultRemoteServer
+
+
+class Invalid(object):
+
+    def non_dict_result_dict(self):
+        return 42
+
+    def invalid_result_dict(self):
+        return {}
+
+    def invalid_char_in_xml(self):
+        return {'status': 'PASS', 'return': '\x00'}
+
+    def exception(self, message):
+        raise Exception(message)
+
+    def shutdown(self):
+        sys.exit()
+
+
+if __name__ == '__main__':
+    DirectResultRemoteServer(Invalid(), *sys.argv[1:])
=======================================
--- /dev/null
+++ /atest/testdata/standard_libraries/remote/invalid.txt Mon Dec 16 10:06:17 2013 UTC
@@ -0,0 +1,27 @@
+*** Settings ***
+Library           Remote   http://127.0.0.1:${PORT}
+
+*** Variables ***
+${PORT}           8270
+
+*** Test Cases ***
+Non dict result dict
+    [Documentation]    FAIL Invalid remote result dictionary: 42
+    Non dict result dict
+
+Invalid result dict
+    [Documentation]    FAIL Invalid remote result dictionary: {}
+    Invalid result dict
+
+Invalid char in XML
+ [Documentation] FAIL STARTS: Processing XML-RPC return value failed. Most often this happens when the return value contains characters that are not valid in XML. Original error was: ExpatError:
+    Invalid char in XML
+
+Exception
+    [Documentation]    FAIL <type 'exceptions.Exception'>:my message
+    Exception   my message
+
+Broken connection
+    [Documentation]    FAIL STARTS: Connection to remote server broken:
+    Shutdown
+    Exception    connection already broken
=======================================
--- /atest/testdata/standard_libraries/remote/remoteserver.py Mon Dec 16 09:41:35 2013 UTC +++ /atest/testdata/standard_libraries/remote/remoteserver.py Mon Dec 16 10:06:17 2013 UTC
@@ -8,12 +8,17 @@
     def __init__(self, library, port=8270, port_file=None):
         SimpleXMLRPCServer.__init__(self, ('127.0.0.1', int(port)))
         self.library = library
+        self._shutdown = False
         self.register_function(self.get_keyword_names)
         self.register_function(self.get_keyword_arguments)
         self.register_function(self.run_keyword)
         announce_port(self.socket, port_file)
         self.serve_forever()

+    def serve_forever(self):
+        while not self._shutdown:
+            self.handle_request()
+
     def get_keyword_names(self):
         return [attr for attr in dir(self.library) if attr[0] != '_']

@@ -43,7 +48,11 @@
 class DirectResultRemoteServer(RemoteServer):

     def run_keyword(self, name, args, kwargs=None):
-        return getattr(self.library, name)(*args, **(kwargs or {}))
+        try:
+            return getattr(self.library, name)(*args, **(kwargs or {}))
+        except SystemExit:
+            self._shutdown = True
+            return {'status': 'PASS'}


 def announce_port(socket, port_file=None):
=======================================
--- /src/robot/libraries/Remote.py      Mon Dec 16 08:30:01 2013 UTC
+++ /src/robot/libraries/Remote.py      Mon Dec 16 10:06:17 2013 UTC
@@ -114,14 +114,13 @@
 class RemoteResult(object):

     def __init__(self, result):
-        try:
-            self.status = result['status']
-            self.output = self._get(result, 'output')
-            self.return_ = self._get(result, 'return')
-            self.error = self._get(result, 'error')
-            self.traceback = self._get(result, 'traceback')
-        except (KeyError, AttributeError):
+        if not (is_dict_like(result) and 'status' in result):
raise RuntimeError('Invalid remote result dictionary: %s' % result)
+        self.status = result['status']
+        self.output = self._get(result, 'output')
+        self.return_ = self._get(result, 'return')
+        self.error = self._get(result, 'error')
+        self.traceback = self._get(result, 'traceback')

     def _get(self, result, key):
         value = result.get(key, '')

==============================================================================
Revision: b0a9ed7cd86c
Branch:   default
Author:   Pekka Klärck
Date:     Mon Dec 16 12:08:37 2013 UTC
Log:      remote tests: better suite name
http://code.google.com/p/robotframework/source/detail?r=b0a9ed7cd86c

Added:
 /atest/robot/standard_libraries/remote/argumemt_coersion.txt
 /atest/testdata/standard_libraries/remote/argument_coersion.txt
Deleted:
 /atest/robot/standard_libraries/remote/type_coersion.txt
 /atest/testdata/standard_libraries/remote/type_coersion.txt

=======================================
--- /dev/null
+++ /atest/robot/standard_libraries/remote/argumemt_coersion.txt Mon Dec 16 12:08:37 2013 UTC
@@ -0,0 +1,50 @@
+*** Settings ***
+Suite Setup      Run Remote Tests    argument_coersion.txt    arguments.py
+Force Tags       regression    pybot    jybot
+Resource         remote_resource.txt
+
+*** Test Cases ***
+String
+    Check Test Case    ${TESTNAME}
+
+Newline an tab
+    Check Test Case    ${TESTNAME}
+
+Binary
+    Check Test Case    ${TESTNAME}
+
+Binary with too big Unicode characters
+    Check Test Case    ${TESTNAME}
+
+Unrepresentable Unicode
+    Check Test Case    ${TESTNAME}
+
+Integer
+    Check Test Case    ${TESTNAME}
+
+Float
+    Check Test Case    ${TESTNAME}
+
+Boolean
+    Check Test Case    ${TESTNAME}
+
+None
+    Check Test Case    ${TESTNAME}
+
+Arbitrary object
+    Check Test Case    ${TESTNAME}
+
+List
+    Check Test Case    ${TESTNAME}
+
+List like
+    Check Test Case    ${TESTNAME}
+
+Dict
+    Check Test Case    ${TESTNAME}
+
+Dict with non-string keys
+    Check Test Case    ${TESTNAME}
+
+Mapping
+    Check Test Case    ${TESTNAME}
=======================================
--- /dev/null
+++ /atest/testdata/standard_libraries/remote/argument_coersion.txt Mon Dec 16 12:08:37 2013 UTC
@@ -0,0 +1,88 @@
+*** Settings ***
+Test Template     Argument Should Be Passed Correctly
+Library           Remote    127.0.0.1:${PORT}
+Library           Helper.py
+Variables         variables.py
+
+*** Variables ***
+${PORT}           8270
+
+*** Test Cases ***
+String
+    'Hello, world!'
+    u'hyv\\xe4 \\u2603'
+    ''
+
+Newline an tab
+    '\\t\\n\\r'    '\\t\\n\\n'
+
+Binary
+    '\\x00\\x01\\xff'    binary=yes
+    'foo\\x00bar'        binary=yes
+    u'\\x00\\x01'        binary=yes
+
+Binary with too big Unicode characters
+    [Template]  Run Keyword And Expect Error
+ ValueError: Cannot represent u'\\x00\\x01\\xff' as binary. One Argument \x00\x01\xff + ValueError: Cannot represent u'\\x00\\x01\\u2603' as binary. One Argument \x00\x01\u2603
+
+Unrepresentable Unicode
+    [Template]  Run Keyword And Expect Error
+    *    One Argument    \uFFFF
+    *    One Argument    \uD800
+
+Integer
+    0
+    42
+    -1
+
+Float
+    0.0
+    3.14
+    -0.5
+
+Boolean
+    True
+    False
+
+None
+    None    ''
+
+Arbitrary object
+    ${MyObject()}    '<MyObject>'
+
+List
+    \[]
+    \['a', 'b', 'c']
+    \['One', -2, False]
+    \[None]    ['']
+    \[['a', 'b'], 3, [[[4]]]]
+
+List like
+    ()    []
+    ('a', 'b', 'c')    ['a', 'b', 'c']
+    ('One', -2, False, (None,))    ['One', -2, False, ['']]
+    set()    []
+    xrange(5)    [0, 1, 2, 3, 4]
+
+Dict
+    {}
+    {'one': 1, 'spam': 'eggs'}
+    {None: None}    {'': ''}
+    {'a': 0, 'b': True, 'c': {'x': [1, 2, 3]}}
+
+Dict with non-string keys
+    {1: 'a', 2: 3, (): ()}    {'1': 'a', '2': 3, '()': []}
+
+Mapping
+    ${MyMapping()}    {}
+ ${MyMapping(a='one', b=2, c=[None, True])} {'a': 'one', 'b': 2, 'c': ['', True]}
+
+
+*** Keywords ***
+Argument Should Be Passed Correctly
+    [Arguments]    ${argument}    ${expected}=${NONE}    ${binary}=${FALSE}
+    ${expected} =    Get Non None    ${expected}   ${argument}
+    ${argument} =    Evaluate If String    ${argument}
+    Argument Should Be    ${argument}    ${expected}    ${binary}
+ Kwarg Should Be argument=${argument} expected=${expected} binary=${binary}
=======================================
--- /atest/robot/standard_libraries/remote/type_coersion.txt Sun Dec 15 00:27:17 2013 UTC
+++ /dev/null
@@ -1,50 +0,0 @@
-*** Settings ***
-Suite Setup      Run Remote Tests    type_coersion.txt    arguments.py
-Force Tags       regression    pybot    jybot
-Resource         remote_resource.txt
-
-*** Test Cases ***
-String
-    Check Test Case    ${TESTNAME}
-
-Newline an tab
-    Check Test Case    ${TESTNAME}
-
-Binary
-    Check Test Case    ${TESTNAME}
-
-Binary with too big Unicode characters
-    Check Test Case    ${TESTNAME}
-
-Unrepresentable Unicode
-    Check Test Case    ${TESTNAME}
-
-Integer
-    Check Test Case    ${TESTNAME}
-
-Float
-    Check Test Case    ${TESTNAME}
-
-Boolean
-    Check Test Case    ${TESTNAME}
-
-None
-    Check Test Case    ${TESTNAME}
-
-Arbitrary object
-    Check Test Case    ${TESTNAME}
-
-List
-    Check Test Case    ${TESTNAME}
-
-List like
-    Check Test Case    ${TESTNAME}
-
-Dict
-    Check Test Case    ${TESTNAME}
-
-Dict with non-string keys
-    Check Test Case    ${TESTNAME}
-
-Mapping
-    Check Test Case    ${TESTNAME}
=======================================
--- /atest/testdata/standard_libraries/remote/type_coersion.txt Sat Dec 14 23:04:36 2013 UTC
+++ /dev/null
@@ -1,88 +0,0 @@
-*** Settings ***
-Test Template     Argument Should Be Passed Correctly
-Library           Remote    127.0.0.1:${PORT}
-Library           Helper.py
-Variables         variables.py
-
-*** Variables ***
-${PORT}           8270
-
-*** Test Cases ***
-String
-    'Hello, world!'
-    u'hyv\\xe4 \\u2603'
-    ''
-
-Newline an tab
-    '\\t\\n\\r'    '\\t\\n\\n'
-
-Binary
-    '\\x00\\x01\\xff'    binary=yes
-    'foo\\x00bar'        binary=yes
-    u'\\x00\\x01'        binary=yes
-
-Binary with too big Unicode characters
-    [Template]  Run Keyword And Expect Error
- ValueError: Cannot represent u'\\x00\\x01\\xff' as binary. One Argument \x00\x01\xff - ValueError: Cannot represent u'\\x00\\x01\\u2603' as binary. One Argument \x00\x01\u2603
-
-Unrepresentable Unicode
-    [Template]  Run Keyword And Expect Error
-    *    One Argument    \uFFFF
-    *    One Argument    \uD800
-
-Integer
-    0
-    42
-    -1
-
-Float
-    0.0
-    3.14
-    -0.5
-
-Boolean
-    True
-    False
-
-None
-    None    ''
-
-Arbitrary object
-    ${MyObject()}    '<MyObject>'
-
-List
-    \[]
-    \['a', 'b', 'c']
-    \['One', -2, False]
-    \[None]    ['']
-    \[['a', 'b'], 3, [[[4]]]]
-
-List like
-    ()    []
-    ('a', 'b', 'c')    ['a', 'b', 'c']
-    ('One', -2, False, (None,))    ['One', -2, False, ['']]
-    set()    []
-    xrange(5)    [0, 1, 2, 3, 4]
-
-Dict
-    {}
-    {'one': 1, 'spam': 'eggs'}
-    {None: None}    {'': ''}
-    {'a': 0, 'b': True, 'c': {'x': [1, 2, 3]}}
-
-Dict with non-string keys
-    {1: 'a', 2: 3, (): ()}    {'1': 'a', '2': 3, '()': []}
-
-Mapping
-    ${MyMapping()}    {}
- ${MyMapping(a='one', b=2, c=[None, True])} {'a': 'one', 'b': 2, 'c': ['', True]}
-
-
-*** Keywords ***
-Argument Should Be Passed Correctly
-    [Arguments]    ${argument}    ${expected}=${NONE}    ${binary}=${FALSE}
-    ${expected} =    Get Non None    ${expected}   ${argument}
-    ${argument} =    Evaluate If String    ${argument}
-    Argument Should Be    ${argument}    ${expected}    ${binary}
- Kwarg Should Be argument=${argument} expected=${expected} binary=${binary}

==============================================================================
Revision: 1280d5e8af06
Branch:   default
Author:   Pekka Klärck
Date:     Mon Dec 16 12:09:02 2013 UTC
Log:      remote: ironpython compatibility to code and tests
http://code.google.com/p/robotframework/source/detail?r=1280d5e8af06

Modified:
 /atest/robot/standard_libraries/remote/argumemt_coersion.txt
 /atest/robot/standard_libraries/remote/invalid.txt
 /atest/testdata/standard_libraries/remote/argument_coersion.txt
 /atest/testdata/standard_libraries/remote/variables.py
 /src/robot/libraries/Remote.py

=======================================
--- /atest/robot/standard_libraries/remote/argumemt_coersion.txt Mon Dec 16 12:08:37 2013 UTC +++ /atest/robot/standard_libraries/remote/argumemt_coersion.txt Mon Dec 16 12:09:02 2013 UTC
@@ -12,6 +12,10 @@

 Binary
     Check Test Case    ${TESTNAME}
+
+Binary in non-ASCII range
+    [Tags]    x-fails-on-ipy
+    Check Test Case    ${TESTNAME}

 Binary with too big Unicode characters
     Check Test Case    ${TESTNAME}
=======================================
--- /atest/robot/standard_libraries/remote/invalid.txt Mon Dec 16 10:06:17 2013 UTC +++ /atest/robot/standard_libraries/remote/invalid.txt Mon Dec 16 12:09:02 2013 UTC
@@ -11,6 +11,7 @@
     Check Test Case    ${TESTNAME}

 Invalid char in XML
+    [Tags]    x-fails-on-ipy
     Check Test Case    ${TESTNAME}

 Exception
=======================================
--- /atest/testdata/standard_libraries/remote/argument_coersion.txt Mon Dec 16 12:08:37 2013 UTC +++ /atest/testdata/standard_libraries/remote/argument_coersion.txt Mon Dec 16 12:09:02 2013 UTC
@@ -17,10 +17,13 @@
     '\\t\\n\\r'    '\\t\\n\\n'

 Binary
-    '\\x00\\x01\\xff'    binary=yes
+    '\\x00\\x01\\x02'    binary=yes
     'foo\\x00bar'        binary=yes
     u'\\x00\\x01'        binary=yes

+Binary in non-ASCII range
+    '\\x00\\x01\\xff'    binary=yes
+
 Binary with too big Unicode characters
     [Template]  Run Keyword And Expect Error
ValueError: Cannot represent u'\\x00\\x01\\xff' as binary. One Argument \x00\x01\xff
@@ -76,6 +79,7 @@

 Mapping
     ${MyMapping()}    {}
+    ${MyMapping(a=1)}    {'a': 1}
${MyMapping(a='one', b=2, c=[None, True])} {'a': 'one', 'b': 2, 'c': ['', True]}


=======================================
--- /atest/testdata/standard_libraries/remote/variables.py Thu Dec 12 09:53:20 2013 UTC +++ /atest/testdata/standard_libraries/remote/variables.py Mon Dec 16 12:09:02 2013 UTC
@@ -10,7 +10,7 @@

         def __init__(self, data=None, **extra):
             self.data = data or {}
-            self.data.update(**extra)
+            self.data.update(extra)

         def __getitem__(self, item):
             return self.data[item]
=======================================
--- /src/robot/libraries/Remote.py      Mon Dec 16 10:06:17 2013 UTC
+++ /src/robot/libraries/Remote.py      Mon Dec 16 12:09:02 2013 UTC
@@ -167,7 +167,7 @@
             return self._server.run_keyword(*run_keyword_args)
         except xmlrpclib.Fault, err:
             message = err.faultString
-        except socket.error, (errno, err):
+        except socket.error, err:
             message = 'Connection to remote server broken: %s' % err
         except ExpatError, err:
             message = ('Processing XML-RPC return value failed. '

==============================================================================
Revision: 81cf4486bd60
Branch:   default
Author:   Pekka Klärck
Date:     Mon Dec 16 12:31:23 2013 UTC
Log:      fixed typo in suite name
http://code.google.com/p/robotframework/source/detail?r=81cf4486bd60

Added:
 /atest/robot/standard_libraries/remote/argument_coersion.txt
Deleted:
 /atest/robot/standard_libraries/remote/argumemt_coersion.txt

=======================================
--- /dev/null
+++ /atest/robot/standard_libraries/remote/argument_coersion.txt Mon Dec 16 12:31:23 2013 UTC
@@ -0,0 +1,54 @@
+*** Settings ***
+Suite Setup      Run Remote Tests    argument_coersion.txt    arguments.py
+Force Tags       regression    pybot    jybot
+Resource         remote_resource.txt
+
+*** Test Cases ***
+String
+    Check Test Case    ${TESTNAME}
+
+Newline an tab
+    Check Test Case    ${TESTNAME}
+
+Binary
+    Check Test Case    ${TESTNAME}
+
+Binary in non-ASCII range
+    [Tags]    x-fails-on-ipy
+    Check Test Case    ${TESTNAME}
+
+Binary with too big Unicode characters
+    Check Test Case    ${TESTNAME}
+
+Unrepresentable Unicode
+    Check Test Case    ${TESTNAME}
+
+Integer
+    Check Test Case    ${TESTNAME}
+
+Float
+    Check Test Case    ${TESTNAME}
+
+Boolean
+    Check Test Case    ${TESTNAME}
+
+None
+    Check Test Case    ${TESTNAME}
+
+Arbitrary object
+    Check Test Case    ${TESTNAME}
+
+List
+    Check Test Case    ${TESTNAME}
+
+List like
+    Check Test Case    ${TESTNAME}
+
+Dict
+    Check Test Case    ${TESTNAME}
+
+Dict with non-string keys
+    Check Test Case    ${TESTNAME}
+
+Mapping
+    Check Test Case    ${TESTNAME}
=======================================
--- /atest/robot/standard_libraries/remote/argumemt_coersion.txt Mon Dec 16 12:09:02 2013 UTC
+++ /dev/null
@@ -1,54 +0,0 @@
-*** Settings ***
-Suite Setup      Run Remote Tests    argument_coersion.txt    arguments.py
-Force Tags       regression    pybot    jybot
-Resource         remote_resource.txt
-
-*** Test Cases ***
-String
-    Check Test Case    ${TESTNAME}
-
-Newline an tab
-    Check Test Case    ${TESTNAME}
-
-Binary
-    Check Test Case    ${TESTNAME}
-
-Binary in non-ASCII range
-    [Tags]    x-fails-on-ipy
-    Check Test Case    ${TESTNAME}
-
-Binary with too big Unicode characters
-    Check Test Case    ${TESTNAME}
-
-Unrepresentable Unicode
-    Check Test Case    ${TESTNAME}
-
-Integer
-    Check Test Case    ${TESTNAME}
-
-Float
-    Check Test Case    ${TESTNAME}
-
-Boolean
-    Check Test Case    ${TESTNAME}
-
-None
-    Check Test Case    ${TESTNAME}
-
-Arbitrary object
-    Check Test Case    ${TESTNAME}
-
-List
-    Check Test Case    ${TESTNAME}
-
-List like
-    Check Test Case    ${TESTNAME}
-
-Dict
-    Check Test Case    ${TESTNAME}
-
-Dict with non-string keys
-    Check Test Case    ${TESTNAME}
-
-Mapping
-    Check Test Case    ${TESTNAME}

--

--- 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