mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Silence DeprecationWarnings in test_unicode.
This commit is contained in:
parent
795c10b3b6
commit
51e243f22e
1 changed files with 10 additions and 8 deletions
|
@ -2172,6 +2172,8 @@ class UnicodeTest(string_tests.CommonTest,
|
|||
# generate a fresh string (refcount=1)
|
||||
text = 'a' * length + 'b'
|
||||
|
||||
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue