diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2020-05-12 13:18:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-12 13:18:00 (GMT) |
commit | 5650e76f63a6f4ec55d00ec13f143d84a2efee39 (patch) | |
tree | 6a3179a1f7b94c3d65985b49c81a5a8fa94e327a /Lib/test/test_unicode.py | |
parent | 7c6e97077525f0ad3cfa0971028313b9079449fd (diff) | |
download | cpython-5650e76f63a6f4ec55d00ec13f143d84a2efee39.zip cpython-5650e76f63a6f4ec55d00ec13f143d84a2efee39.tar.gz cpython-5650e76f63a6f4ec55d00ec13f143d84a2efee39.tar.bz2 |
bpo-40596: Fix str.isidentifier() for non-canonicalized strings containing non-BMP characters on Windows. (GH-20053)
Diffstat (limited to 'Lib/test/test_unicode.py')
-rw-r--r-- | Lib/test/test_unicode.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py index 2839889..2ee4e64 100644 --- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@ -720,6 +720,13 @@ class UnicodeTest(string_tests.CommonTest, self.assertFalse("©".isidentifier()) self.assertFalse("0".isidentifier()) + @support.cpython_only + def test_isidentifier_legacy(self): + import _testcapi + u = '𝖀𝖓𝖎𝖈𝖔𝖉𝖊' + self.assertTrue(u.isidentifier()) + self.assertTrue(_testcapi.unicode_legacy_string(u).isidentifier()) + def test_isprintable(self): self.assertTrue("".isprintable()) self.assertTrue(" ".isprintable()) |