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'
115 x = ur'abc' + Ur'ABC' + uR'ABC' + UR'ABC'
116 y = ur"abc" + Ur"ABC" + uR"ABC" + UR"ABC"
146 def d22(a, b, c=1, d=2): pass
147 def d01v(a=1, *restt, **restd): pass
149 (x, y) <> ({'a':1}, {'b':2})
152 if 1 < 1 > 1 == 1 >= 1 <= 1 <> 1 != 1 in 1 not in 1 is 1 is not 1: pass
163 x = 1 - 1 + 1 - 1 + 1
169 x = ~1 ^ 1 & 1 | 1 & 1 ^ -1
170 x = -1*1/1 + 1*1 - ---1*1
174 x = sys.modules['time'].time()