summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2013-02-20 22:00:17 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2013-02-20 22:00:17 (GMT)
commit6f43a90901dfa62ce8642b1e00da429b5347c768 (patch)
treee5ceccd0fa68f84d7f7309336dc73c31321ad092 /Lib/test
parent2dba1ee3e62f613f8fbf85b997601789fc8f80d1 (diff)
parent51e243f22ef1dcfcbed18374078d37acfc79ab81 (diff)
downloadcpython-6f43a90901dfa62ce8642b1e00da429b5347c768.zip
cpython-6f43a90901dfa62ce8642b1e00da429b5347c768.tar.gz
cpython-6f43a90901dfa62ce8642b1e00da429b5347c768.tar.bz2
Merge heads.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_unicode.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index f7d8686..d4e2222 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -2172,15 +2172,17 @@ class UnicodeTest(string_tests.CommonTest,
# generate a fresh string (refcount=1)
text = 'a' * length + 'b'
- # fill wstr internal field
- abc = text.encode('unicode_internal')
- self.assertEqual(abc.decode('unicode_internal'), text)
-
- # resize text: wstr field must be cleared and then recomputed
- text += 'c'
- abcdef = text.encode('unicode_internal')
- self.assertNotEqual(abc, abcdef)
- self.assertEqual(abcdef.decode('unicode_internal'), text)
+ with support.check_warnings(('unicode_internal codec has been '
+ 'deprecated', DeprecationWarning)):
+ # fill wstr internal field
+ abc = text.encode('unicode_internal')
+ self.assertEqual(abc.decode('unicode_internal'), text)
+
+ # resize text: wstr field must be cleared and then recomputed
+ text += 'c'
+ abcdef = text.encode('unicode_internal')
+ self.assertNotEqual(abc, abcdef)
+ self.assertEqual(abcdef.decode('unicode_internal'), text)
class StringModuleTest(unittest.TestCase):