mirror of
https://github.com/python/cpython.git
synced 2025-11-14 07:49:28 +00:00
Merge DeprecationWarnings silencing in test_unicode from 3.3.
This commit is contained in:
commit
09d9d0f385
1 changed files with 10 additions and 8 deletions
|
|
@ -2196,6 +2196,8 @@ 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'
|
||||||
|
|
||||||
|
with support.check_warnings(('unicode_internal codec has been '
|
||||||
|
'deprecated', DeprecationWarning)):
|
||||||
# fill wstr internal field
|
# fill wstr internal field
|
||||||
abc = text.encode('unicode_internal')
|
abc = text.encode('unicode_internal')
|
||||||
self.assertEqual(abc.decode('unicode_internal'), text)
|
self.assertEqual(abc.decode('unicode_internal'), text)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue