1 # Tests for the 'tokenize' module.
2 # Large bits stolen from test_grammar.py.
16 # Balancing continuation
24 x
= (len(`y`
) + 5*x
- a
[
31 # Backslash means line continuation:
35 # Backslash does not means continuation in comments :\
41 2147483647 != 017777777777
42 -2147483647-1 != 020000000000
49 x
= 0xffffffffffffffffL
50 x
= 0xffffffffffffffffl
51 x
= 077777777777777777L
52 x
= 077777777777777777l
53 x
= 123456789012345678901234567890L
54 x
= 123456789012345678901234567890l
56 # Floating-point numbers
74 x
= "doesn't \"shrink\" does it"
75 y
= 'doesn\'t "shrink" does it'
76 x
= "does \"shrink\" doesn't it"
77 y
= 'does "shrink" doesn\'t it'
84 y
= '\nThe "quick"\nbrown fox\njumps over\nthe \'lazy\' dog.\n'
132 def d22(a, b, c=1, d=2): pass
133 def d01v(a=1, *rest, **rest): pass
135 (x, y) <> ({'a
':1}, {'b
':2})
138 if 1 < 1 > 1 == 1 >= 1 <= 1 <> 1 != 1 in 1 not in 1 is 1 is not 1: pass
149 x = 1 - 1 + 1 - 1 + 1
155 x = ~1 ^ 1 & 1 | 1 & 1 ^ -1
156 x = -1*1/1 + 1*1 - ---1*1
160 x = sys.modules['time
'].time()