You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replaced safe_repr with prepr that drops u prefix and used b.
Main idea was to get Unicode strings logged w/o the annoying u prefix.
Now b prefix is added to byte strings instead. Got also some other
nice functionality kind of for free by extending PrettyPrinter.
safe_repr being replaced by prepr needs to be mentioned in robotframework#1924.
Check log message ${tc.kws[0].msgs[0]} Failed to log following message properly: <Unrepresentable object 'InvalidMessage'. Error: Should not have been logged>
38
+
Check log message ${tc.kws[0].msgs[0]} Failed to log following message properly: <Unrepresentable object InvalidMessage. Error: Should not have been logged>
39
39
Check log message ${tc.kws[0].msgs[1]} Should not have been logged\nTraceback (most recent call last):* DEBUG pattern=true
Copy file name to clipboardExpand all lines: atest/testdata/standard_libraries/builtin/log.robot
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -53,17 +53,17 @@ Log repr
53
53
Log ${list} repr=yes console=please
54
54
55
55
Log pprint
56
-
${dict} = Evaluate {'a long string': 1, 'a longer string!': 2, 'a much, much, much, much, much, much longer string': 3, 'list': ['a long string', 'a longer string!', 'a much, much, much, much, much, much longer string']}
56
+
${dict} = Evaluate {u'a long string': 1, u'a longer string!': 2, u'a much, much, much, much, much, much longer string': 3, u'list': [u'a long string', u'a longer string!', u'a much, much, much, much, much, much longer string']}
57
57
Log ${dict} repr=yes console=please
58
-
${list} = Evaluate ['One', 'Two', 3]
58
+
${list} = Evaluate ['One', u'Two', 3]
59
59
Log ${list} repr=yes console=please
60
-
${list} = Evaluate ['a long string', 'a longer string!', 'a much, much, much, much, much, much longer string']
60
+
${list} = Evaluate ['a long string', u'a longer string!', u'a much, much, much, much, much, much longer string']
61
61
Log ${list} repr=yes console=please
62
-
${dict} = Evaluate {'a long string': 1, 'a longer string!': 2, 'a much, much, much, much, much, much longer string': 3, 'list': ['a long string', 'a longer string!', 'a much, much, much, much, much, much longer string']}
62
+
${dict} = Evaluate {u'a long string': 1, u'a longer string!': 2, u'a much, much, much, much, much, much longer string': 3, u'list': [u'a long string', u'a longer string!', u'a much, much, much, much, much, much longer string']}
63
63
Log ${dict} repr=yes
64
-
${list} = Evaluate ['One', 'Two', 3]
64
+
${list} = Evaluate [u'One', 'Two', 3]
65
65
Log ${list} repr=yes
66
-
${dict} = Evaluate {'a long string': 1, 'a longer string!': 2, 'a much, much, much, much, much, much longer string': 3, 'list': ['a long string', ${42}, u'Hyvää yötä \u2603!', 'a much, much, much, much, much, much longer string', '\\x00\\xff']}
66
+
${dict} = Evaluate {u'a long string': 1, u'a longer string!': 2, u'a much, much, much, much, much, much longer string': 3, u'list': [u'a long string', ${42}, u'Hyvää yötä \u2603!', u'a much, much, much, much, much, much longer string', '\\x00\\xff']}
0 commit comments