Commit 6f43a909 authored by Ezio Melotti's avatar Ezio Melotti

Merge heads.

parents 2dba1ee3 51e243f2
...@@ -2172,15 +2172,17 @@ class UnicodeTest(string_tests.CommonTest, ...@@ -2172,15 +2172,17 @@ class UnicodeTest(string_tests.CommonTest,
# generate a fresh string (refcount=1) # generate a fresh string (refcount=1)
text = 'a' * length + 'b' text = 'a' * length + 'b'
# fill wstr internal field with support.check_warnings(('unicode_internal codec has been '
abc = text.encode('unicode_internal') 'deprecated', DeprecationWarning)):
self.assertEqual(abc.decode('unicode_internal'), text) # fill wstr internal field
abc = text.encode('unicode_internal')
# resize text: wstr field must be cleared and then recomputed self.assertEqual(abc.decode('unicode_internal'), text)
text += 'c'
abcdef = text.encode('unicode_internal') # resize text: wstr field must be cleared and then recomputed
self.assertNotEqual(abc, abcdef) text += 'c'
self.assertEqual(abcdef.decode('unicode_internal'), text) abcdef = text.encode('unicode_internal')
self.assertNotEqual(abc, abcdef)
self.assertEqual(abcdef.decode('unicode_internal'), text)
class StringModuleTest(unittest.TestCase): class StringModuleTest(unittest.TestCase):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment