[Python-checkins] cpython: #13406: correct the error message in check_warnings too.

ezio.melotti python-checkins at python.org
Wed Nov 16 08:54:52 CET 2011


http://hg.python.org/cpython/rev/028b61c4f926
changeset:   73589:028b61c4f926
user:        Ezio Melotti <ezio.melotti at gmail.com>
date:        Wed Nov 16 09:54:19 2011 +0200
summary:
  #13406: correct the error message in check_warnings too.

files:
  Lib/test/test_codecs.py |  6 +++---
  1 files changed, 3 insertions(+), 3 deletions(-)


diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py
--- a/Lib/test/test_codecs.py
+++ b/Lib/test/test_codecs.py
@@ -1030,7 +1030,7 @@
         for internal in not_ok:
             if sys.byteorder == "little":
                 internal = bytes(reversed(internal))
-            with support.check_warnings(('unicode_internal codecs has been '
+            with support.check_warnings(('unicode_internal codec has been '
                                          'deprecated', DeprecationWarning)):
                 self.assertRaises(UnicodeDecodeError, internal.decode,
                                   "unicode_internal")
@@ -1038,7 +1038,7 @@
     @unittest.skipUnless(SIZEOF_WCHAR_T == 4, 'specific to 32-bit wchar_t')
     def test_decode_error_attributes(self):
         try:
-            with support.check_warnings(('unicode_internal codecs has been '
+            with support.check_warnings(('unicode_internal codec has been '
                                          'deprecated', DeprecationWarning)):
                 b"\x00\x00\x00\x00\x00\x11\x11\x00".decode("unicode_internal")
         except UnicodeDecodeError as ex:
@@ -1053,7 +1053,7 @@
     def test_decode_callback(self):
         codecs.register_error("UnicodeInternalTest", codecs.ignore_errors)
         decoder = codecs.getdecoder("unicode_internal")
-        with support.check_warnings(('unicode_internal codecs has been '
+        with support.check_warnings(('unicode_internal codec has been '
                                      'deprecated', DeprecationWarning)):
             ab = "ab".encode("unicode_internal").decode()
             ignored = decoder(bytes("%s\x22\x22\x22\x22%s" % (ab[:4], ab[4:]),

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list