Skip to content

Commit dce0587

Browse files
committed
Fix test compatibility
1 parent 1b2fb82 commit dce0587

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

test/atest/kwargs.robot

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,9 @@ Non-string kwargs
6161
Binary kwargs
6262
${tuple} = Evaluate ('\x02',)
6363
${result} = Kwargs a=\x00 b=\x01 c=${tuple}
64-
Should be equal ${result} a:\x00, b:\x01, c:[b'\\x02'] (list)
64+
Log ${result} formatter=repr
65+
IF ${PY2}
66+
Should be equal ${result} ${{b"a:\x00, b:\x01, c:['\\x02'] (list)"}}
67+
ELSE
68+
Should be equal ${result} ${{b"a:\x00, b:\x01, c:[b'\\x02'] (list)"}}
69+
END

test/atest/returning.robot

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Non-ASCII Bytes
2323

2424
Binary
2525
b'\\x00\\x01\\x02'
26-
u'\\x00\\x01\\x02'
26+
u'\\x00\\x01\\x02' b'\\x00\\x01\\x02'
2727
b'\\x00\\xe4\\xff'
2828

2929
Unrepresentable binary
@@ -58,18 +58,21 @@ Custom object with non-ASCII representation
5858
MyObject(u'hyv\\xe4') u'hyv\\xe4'
5959

6060
Custom object with binary representation
61-
MyObject('\\x00\\x01') '\\x00\\x01'
61+
MyObject('\\x00\\x01') b'\\x00\\x01'
6262

6363
List
6464
\[]
65-
\['Hei', u'\\xe4iti', 63, True, '\\x00']
65+
\['Hei', 'äiti', 63, True]
6666
\[None, MyObject('xxx'), MyObject(u'\\xe4')] ['', 'xxx', u'\\xe4']
6767
\[[0, [[]]], [1, 2], [[True], False], 'xxx']
6868

69+
List with binary values
70+
\[u'\x01', b'\x01', b''] [b'\x01', b'\x01', b'']
71+
6972
List-like
7073
[Documentation] Tuples etc. are converted to lists
7174
() []
72-
('Hei', u'\\xe4iti', 63, (), None) ['Hei', u'\\xe4iti', 63, [], '']
75+
('Hei', 'äiti', 63, (), None) ['Hei', 'äiti', 63, [], '']
7376
set(['hello']) ['hello']
7477
(i for i in range(5)) [0, 1, 2, 3, 4]
7578

@@ -83,20 +86,20 @@ Dictionary with non-ASCII keys and values
8386
{u'\\xe4': u'\\xe4', u'\\u2603': u'\\u2603'}
8487

8588
Dictionary with non-ASCII byte keys is not supported
86-
[Documentation] FAIL GLOB: TypeError: *unhashable*
89+
[Documentation] FAIL GLOB: TypeError: *unhashable*
8790
[Template] Return Evaluated
8891
{b'\\xe4': 'value'}
8992

9093
Dictionary with non-ASCII byte values
9194
{'key': b'\\xe4'}
9295

9396
Dictionary with binary keys is not supported
94-
[Documentation] FAIL GLOB: TypeError: *unhashable*
97+
[Documentation] FAIL GLOB: TypeError: *unhashable*
9598
[Template] Return Evaluated
9699
{u'\\x00': 'value'}
97100

98101
Dictionary with binary values
99-
{'0': u'\\x00', '1': b'\\xff'}
102+
{'0': u'\\x00', '1': b'\\xff'} {'0': b'\\x00', '1': b'\\xff'}
100103

101104
Dictionary with non-string keys and values
102105
[Documentation] XML-RPC supports only strings as keys so must convert them

test/atest/stopping.robot

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ Stop Remote Server
88
Stop Remote Server
99

1010
Stop Remote Server Disabled
11-
[Documentation] FAIL Not stopped!
12-
... LOG 2 WARN GLOB: Robot Framework remote server at 127.0.0.1:* does not allow stopping.
11+
[Documentation] LOG 1 WARN GLOB:
12+
... Robot Framework remote server at 127.0.0.1:* does not allow stopping.
1313
[Setup] Start Server no_stop
1414
Stop Remote Server Disabled.Stop Remote Server
15-
Fail Not stopped!
15+
Server Should Be Started
1616
[Teardown] Terminate Process
1717

1818
SIGINT

0 commit comments

Comments
 (0)