diff options
author | Walter Dörwald <walter@livinglogic.de> | 2007-05-17 18:35:58 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2007-05-17 18:35:58 (GMT) |
commit | 583118a535c944002f578ae1449b1c29e2ee3e28 (patch) | |
tree | 42c45fb26946ecb26592bb358b22a2ba2d1f03bc /Lib | |
parent | ebe3e16600ddbc19aa7444ec773e2e0786b8a3cf (diff) | |
download | cpython-583118a535c944002f578ae1449b1c29e2ee3e28.zip cpython-583118a535c944002f578ae1449b1c29e2ee3e28.tar.gz cpython-583118a535c944002f578ae1449b1c29e2ee3e28.tar.bz2 |
Fix tests for string encodings.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_codecs.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py index 03be34c..dba9033 100644 --- a/Lib/test/test_codecs.py +++ b/Lib/test/test_codecs.py @@ -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)) |