[Python-3000-checkins] r58856 - python/branches/py3k-pep3137/Lib/test/test_codecs.py

christian.heimes python-3000-checkins at python.org
Mon Nov 5 15:04:41 CET 2007


Author: christian.heimes
Date: Mon Nov  5 15:04:41 2007
New Revision: 58856

Modified:
   python/branches/py3k-pep3137/Lib/test/test_codecs.py
Log:
And another problem caused by str(bytes()) == repr(bytes()). I didn't understand why the test failed until I made str(bytes()) raise an exception.

Modified: python/branches/py3k-pep3137/Lib/test/test_codecs.py
==============================================================================
--- python/branches/py3k-pep3137/Lib/test/test_codecs.py	(original)
+++ python/branches/py3k-pep3137/Lib/test/test_codecs.py	Mon Nov  5 15:04:41 2007
@@ -802,7 +802,7 @@
         if sys.maxunicode > 0xffff:
             codecs.register_error("UnicodeInternalTest", codecs.ignore_errors)
             decoder = codecs.getdecoder("unicode_internal")
-            ab = "ab".encode("unicode_internal")
+            ab = "ab".encode("unicode_internal").decode()
             ignored = decoder(bytes("%s\x22\x22\x22\x22%s" % (ab[:4], ab[4:]),
                                     "ascii"),
                               "UnicodeInternalTest")


More information about the Python-3000-checkins mailing list