gvsig-scripting / org.gvsig.scripting / trunk / org.gvsig.scripting / org.gvsig.scripting.app / org.gvsig.scripting.app.mainplugin / src / main / resources-plugin / scripting / lib / pylint / test / functional / anomalous_unicode_escape_py3.py @ 745
History | View | Annotate | Download (672 Bytes)
1 |
# pylint:disable=W0105, W0511
|
---|---|
2 |
"""Test for backslash escapes in byte vs unicode strings"""
|
3 |
|
4 |
# Would be valid in Unicode, but probably not what you want otherwise
|
5 |
BAD_UNICODE = b'\u0042' # [anomalous-unicode-escape-in-string] |
6 |
BAD_LONG_UNICODE = b'\U00000042' # [anomalous-unicode-escape-in-string] |
7 |
# +1:[anomalous-unicode-escape-in-string]
|
8 |
BAD_NAMED_UNICODE = b'\N{GREEK SMALL LETTER ALPHA}'
|
9 |
|
10 |
GOOD_UNICODE = u'\u0042'
|
11 |
GOOD_LONG_UNICODE = u'\U00000042'
|
12 |
GOOD_NAMED_UNICODE = u'\N{GREEK SMALL LETTER ALPHA}'
|
13 |
|
14 |
|
15 |
# Valid raw strings
|
16 |
RAW_BACKSLASHES = r'raw'
|
17 |
|
18 |
# In a comment you can have whatever you want: \ \\ \n \m
|
19 |
# even things that look like bad strings: "C:\Program Files"
|