summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tokenize.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2012-03-06 20:33:24 (GMT)
committerBrett Cannon <brett@python.org>2012-03-06 20:33:24 (GMT)
commitf67e494ca8dfc72c0f812ed46c6a08ad3b9ddc24 (patch)
treeceed84488164142e5884411566de19f66702c3e7 /Lib/test/test_tokenize.py
parent0d4d410b2d6891520b1772a85f5ebdf926a0c77e (diff)
parent0119e4753eec50f671ee716af202b4a1ca28deef (diff)
downloadcpython-f67e494ca8dfc72c0f812ed46c6a08ad3b9ddc24.zip
cpython-f67e494ca8dfc72c0f812ed46c6a08ad3b9ddc24.tar.gz
cpython-f67e494ca8dfc72c0f812ed46c6a08ad3b9ddc24.tar.bz2
merge
Diffstat (limited to 'Lib/test/test_tokenize.py')
-rw-r--r--Lib/test/test_tokenize.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/test/test_tokenize.py b/Lib/test/test_tokenize.py
index dce3c6e..db87e11 100644
--- a/Lib/test/test_tokenize.py
+++ b/Lib/test/test_tokenize.py
@@ -563,6 +563,18 @@ Non-ascii identifiers
NAME 'grün' (2, 0) (2, 4)
OP '=' (2, 5) (2, 6)
STRING "'green'" (2, 7) (2, 14)
+
+Legacy unicode literals:
+
+ >>> dump_tokens("Örter = u'places'\\ngrün = UR'green'")
+ ENCODING 'utf-8' (0, 0) (0, 0)
+ NAME 'Örter' (1, 0) (1, 5)
+ OP '=' (1, 6) (1, 7)
+ STRING "u'places'" (1, 8) (1, 17)
+ NEWLINE '\\n' (1, 17) (1, 18)
+ NAME 'grün' (2, 0) (2, 4)
+ OP '=' (2, 5) (2, 6)
+ STRING "UR'green'" (2, 7) (2, 16)
"""
from test import support