summaryrefslogtreecommitdiff
path: root/tests/stress_phystoken.tok
blob: 8d1b6bec129d1c49ea9b3545b934e55ccb9d322d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Here's some random Python so that test_tokenize_myself will have some
# stressful stuff to try.  This file is .tok instead of .py so pylint won't
# complain about it, check_eol won't look at it, etc.

first_back = """\
hey there!
"""

other_back = """
hey \
there
"""

lots_of_back = """\
hey \
there
"""
# This next line is supposed to have trailing whitespace:
fake_back = """\ 
ouch
"""

# Lots of difficulty happens with code like:
#
# fake_back = """\
# ouch
# """
#
# Ugh, the edge cases...

# What about a comment like this\
"what's this string doing here?"

class C(object):
        def there():
                this = 5 + \
                    7
                that = \
                    "a continued line"

cont1 = "one line of text" + \
    "another line of text"

a_long_string =              \
    "part 1"                 \
    "2"                      \
    "3 is longer"

def hello():
        print("Hello world!")

hello()