summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2007-06-06 15:17:22 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2007-06-06 15:17:22 (GMT)
commitfee1af9d1cf1836113e61e41acd8e913736644a1 (patch)
tree9126007eeb5ab34d8fcbdf885f0b75749c2b0ba0 /Lib/test
parent933daed9227fa7d6fcb63f411a51782777c15dfc (diff)
downloadcpython-fee1af9d1cf1836113e61e41acd8e913736644a1.zip
cpython-fee1af9d1cf1836113e61e41acd8e913736644a1.tar.gz
cpython-fee1af9d1cf1836113e61e41acd8e913736644a1.tar.bz2
Fix test_codeccallbacks.py: bytes has no % operator.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_codeccallbacks.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_codeccallbacks.py b/Lib/test/test_codeccallbacks.py
index 4981d54..31604ff 100644
--- a/Lib/test/test_codeccallbacks.py
+++ b/Lib/test/test_codeccallbacks.py
@@ -140,17 +140,17 @@ class CodecCallbackTest(unittest.TestCase):
sin += chr(sys.maxunicode)
sout = b"a\\xac\\u1234\\u20ac\\u8000"
if sys.maxunicode > 0xffff:
- sout += b"\\U%08x" % sys.maxunicode
+ sout += bytes("\\U%08x" % sys.maxunicode)
self.assertEqual(sin.encode("ascii", "backslashreplace"), sout)
sout = b"a\xac\\u1234\\u20ac\\u8000"
if sys.maxunicode > 0xffff:
- sout += b"\\U%08x" % sys.maxunicode
+ sout += bytes("\\U%08x" % sys.maxunicode)
self.assertEqual(sin.encode("latin-1", "backslashreplace"), sout)
sout = b"a\xac\\u1234\xa4\\u8000"
if sys.maxunicode > 0xffff:
- sout += b"\\U%08x" % sys.maxunicode
+ sout += bytes("\\U%08x" % sys.maxunicode)
self.assertEqual(sin.encode("iso-8859-15", "backslashreplace"), sout)
def test_decoderelaxedutf8(self):