File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ ${INPUT FILE} %{TEMPDIR}${/}robot-test-file.xml
70
70
... --name CustomName --suite nonex ${INPUT FILE } ${INPUT FILE }
71
71
72
72
--suite and --test together
73
- Run And Check Suites and Tests --suite tsuite1 --suite tsuite3 --test *1first --test *2* Tsuite1 Suite1 First
73
+ Run And Check Suites and Tests --suite tsuite1 --suite tsuite3 --test *1first --test nomatch Tsuite1 Suite1 First
74
74
75
75
--suite and --test together not matching
76
76
Failing Rebot
Original file line number Diff line number Diff line change @@ -86,10 +86,15 @@ def system_encode(string, errors='replace'):
86
86
87
87
else :
88
88
89
+ # Jython 2.7.1+ uses UTF-8 with cli args etc. regardless the actual system
90
+ # encoding. Cannot set the "real" SYSTEM_ENCODING to that value because
91
+ # we use it also for other purposes.
92
+ _SYSTEM_ENCODING = SYSTEM_ENCODING if not JYTHON else 'UTF-8'
93
+
89
94
def system_decode (string ):
90
95
"""Decodes bytes from system (e.g. cli args or env vars) to Unicode."""
91
96
try :
92
- return string .decode (SYSTEM_ENCODING )
97
+ return string .decode (_SYSTEM_ENCODING )
93
98
except UnicodeError :
94
99
return unic (string )
95
100
@@ -100,4 +105,4 @@ def system_encode(string, errors='replace'):
100
105
"""
101
106
if not is_unicode (string ):
102
107
string = unic (string )
103
- return string .encode (SYSTEM_ENCODING , errors )
108
+ return string .encode (_SYSTEM_ENCODING , errors )
Original file line number Diff line number Diff line change @@ -53,15 +53,19 @@ def _get_encoding(platform_getters, default):
53
53
54
54
55
55
def _get_python_system_encoding ():
56
- # `locale.getpreferredencoding(False)` returns exactly what we want, but
57
- # it doesn't seem to work outside Windows on Python 2. Luckily on these
56
+ # `locale.getpreferredencoding(False)` should return exactly what we want,
57
+ # but it doesn't seem to work outside Windows on Python 2. Luckily on these
58
58
# platforms `sys.getfilesystemencoding()` seems to do the right thing.
59
+ # Jython 2.7.1+ actually uses UTF-8 regardless the system encoding, but
60
+ # that's handled by `system_decode/encode` utilities separately.
59
61
if PY2 and not WINDOWS :
60
62
return sys .getfilesystemencoding ()
61
63
return locale .getpreferredencoding (False )
62
64
63
65
64
66
def _get_java_system_encoding ():
67
+ # This is only used with Jython 2.7.0, others get encoding already
68
+ # from `_get_python_system_encoding`.
65
69
from java .lang import System
66
70
return System .getProperty ('file.encoding' )
67
71
You can’t perform that action at this time.
0 commit comments