]> granicus.if.org Git - python/commitdiff
Fix tests for string encodings.
authorWalter Dörwald <walter@livinglogic.de>
Thu, 17 May 2007 18:35:58 +0000 (18:35 +0000)
committerWalter Dörwald <walter@livinglogic.de>
Thu, 17 May 2007 18:35:58 +0000 (18:35 +0000)
Lib/test/test_codecs.py

index 03be34c7e1c08e3eab286517b8be5a90982e8264..dba90337327032dbb30a64e20ed006d42ef4371f 100644 (file)
@@ -1108,7 +1108,7 @@ all_unicode_encodings = [
 if hasattr(codecs, "mbcs_encode"):
     all_unicode_encodings.append("mbcs")
 
-# The following encodings work only with str, not unicode
+# The following encodings work only with str8, not str
 all_string_encodings = [
     "quopri_codec",
     "string_escape",
@@ -1289,7 +1289,7 @@ class BasicUnicodeTest(unittest.TestCase, MixInCheckStateHandling):
 
 class BasicStrTest(unittest.TestCase):
     def test_basics(self):
-        s = "abc123"
+        s = str8("abc123")
         for encoding in all_string_encodings:
             (encoded, size) = codecs.getencoder(encoding)(s)
             self.assertEqual(size, len(s))