mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-36346: Raise DeprecationWarning when creating legacy Unicode (GH-20933)
This commit is contained in:
parent
349f76c6aa
commit
038dd0f79d
4 changed files with 30 additions and 4 deletions
|
@ -725,7 +725,9 @@ class UnicodeTest(string_tests.CommonTest,
|
|||
import _testcapi
|
||||
u = '𝖀𝖓𝖎𝖈𝖔𝖉𝖊'
|
||||
self.assertTrue(u.isidentifier())
|
||||
self.assertTrue(_testcapi.unicode_legacy_string(u).isidentifier())
|
||||
with support.check_warnings():
|
||||
warnings.simplefilter('ignore', DeprecationWarning)
|
||||
self.assertTrue(_testcapi.unicode_legacy_string(u).isidentifier())
|
||||
|
||||
def test_isprintable(self):
|
||||
self.assertTrue("".isprintable())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue