diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-08-07 10:09:35 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-08-07 10:09:35 (GMT) |
commit | 6c6f851eae204c3a4f85108c3d564133d58c887a (patch) | |
tree | 555d578c77274ff79bf957d7f87dbd9a67c857f3 /Lib/test/test_sys.py | |
parent | 87c9d6cf9cbf2cada6a309cf4e46d77c3484b4c2 (diff) | |
download | cpython-6c6f851eae204c3a4f85108c3d564133d58c887a.zip cpython-6c6f851eae204c3a4f85108c3d564133d58c887a.tar.gz cpython-6c6f851eae204c3a4f85108c3d564133d58c887a.tar.bz2 |
Issue #9425: skip tests if a filename is not encodable
Diffstat (limited to 'Lib/test/test_sys.py')
-rw-r--r-- | Lib/test/test_sys.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index eb5d877..244874d 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -509,8 +509,10 @@ class SysModuleTest(unittest.TestCase): p = subprocess.Popen([sys.executable, "-c", code], stderr=subprocess.PIPE) stdout, stderr = p.communicate() self.assertEqual(p.returncode, 1) - self.assert_(b"UnicodeEncodeError:" in stderr, - "%r not in %s" % (b"UniodeEncodeError:", ascii(stderr))) + self.assertIn( + br"UnicodeEncodeError: 'utf-8' codec can't encode character " + br"'\udcff' in position 7: surrogates not allowed", + stderr) def test_sys_flags(self): self.assertTrue(sys.flags) |