mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-136702: Clear codec caches for refleak tests; use test.support helpers (GH-141345)
This should fix refleak buildbots.
This commit is contained in:
parent
13fa313beb
commit
9f5152441d
4 changed files with 26 additions and 4 deletions
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
from test import support
|
||||
from test.support import os_helper
|
||||
from test.support import warnings_helper
|
||||
|
||||
try:
|
||||
import _testlimitedcapi
|
||||
|
|
@ -3902,8 +3903,8 @@ def test_encodings_normalize_encoding(self):
|
|||
self.assertEqual(normalize('utf...8'), 'utf...8')
|
||||
|
||||
# Non-ASCII *encoding* is deprecated.
|
||||
with self.assertWarnsRegex(DeprecationWarning,
|
||||
"Support for non-ascii encoding names will be removed in 3.17"):
|
||||
msg = "Support for non-ascii encoding names will be removed in 3.17"
|
||||
with warnings_helper.check_warnings((msg, DeprecationWarning)):
|
||||
self.assertEqual(normalize('utf\xE9\u20AC\U0010ffff-8'), 'utf_8')
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue