diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-08-20 11:08:18 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-08-20 11:08:18 (GMT) |
commit | e6376f8849175789c371f292f896ecdccb88b5b1 (patch) | |
tree | 4f2405b8715f78432c2143641c4a472aed075a6b /Lib/test | |
parent | 89d8f82d01b7d0191c07d5553979ffe53d55cf6e (diff) | |
download | cpython-e6376f8849175789c371f292f896ecdccb88b5b1.zip cpython-e6376f8849175789c371f292f896ecdccb88b5b1.tar.gz cpython-e6376f8849175789c371f292f896ecdccb88b5b1.tar.bz2 |
test_main_invalid_unicode() of test_sys: print string as ascii
There are buildbot failures on "x86 FreeBSD 3.x" and "sparc solaris10 gcc 3.x".
I suppose that _Py_char2wchar() doesn't fail even if the locale encoding is
unable to decode the byte string, because _Py_char2wchar() has a special mode
for platform without mbrtowc() (ISO C99) function.
Let's check my theory by avoid error on the Python print() instruction.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_sys.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index 130aa66..448fd3f 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -506,7 +506,7 @@ class SysModuleTest(unittest.TestCase): else: self.skipTest('%r is decodable with encoding %s' % (non_decodable, encoding)) - code = b'print("' + non_decodable + b'")' + code = b'print(ascii("' + non_decodable + b'"))' p = subprocess.Popen([sys.executable, "-c", code], stderr=subprocess.PIPE) stdout, stderr = p.communicate() self.assertEqual(p.returncode, 1) |