mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
closes bpo-34515: Support non-ASCII identifiers in lib2to3. (GH-8950)
This commit is contained in:
parent
d2067318c7
commit
10a428b64b
3 changed files with 16 additions and 6 deletions
|
@ -529,6 +529,16 @@ class TestSetLiteral(GrammarTest):
|
|||
self.validate("""x = {2, 3, 4,}""")
|
||||
|
||||
|
||||
# Adapted from Python 3's Lib/test/test_unicode_identifiers.py and
|
||||
# Lib/test/test_tokenize.py:TokenizeTest.test_non_ascii_identifiers
|
||||
class TestIdentfier(GrammarTest):
|
||||
def test_non_ascii_identifiers(self):
|
||||
self.validate("Örter = 'places'\ngrün = 'green'")
|
||||
self.validate("蟒 = a蟒 = 锦蛇 = 1")
|
||||
self.validate("µ = aµ = µµ = 1")
|
||||
self.validate("𝔘𝔫𝔦𝔠𝔬𝔡𝔢 = a_𝔘𝔫𝔦𝔠𝔬𝔡𝔢 = 1")
|
||||
|
||||
|
||||
class TestNumericLiterals(GrammarTest):
|
||||
def test_new_octal_notation(self):
|
||||
self.validate("""0o7777777777777""")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue