File: stress_phystoken.tok

package info (click to toggle)
python-coverage 5.1%2Bdfsg.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,048 kB
  • sloc: python: 21,288; ansic: 1,212; javascript: 1,077; makefile: 217; sh: 106; xml: 42
file content (55 lines) | stat: -rw-r--r-- 1,101 bytes parent folder | download
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
53
54
55
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt

# 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()