Files
jedi/test.py
2012-03-05 21:34:44 +01:00

121 lines
1.9 KiB
Python

#!/usr/bin/env python
# test comment
import datetime
from token import *
from time import sleep
from token import OP as OP_TEST, INDENT as INDENT_TEST
aaa = 6; bbb = 13
ccc = bbb; d = open("test.py");
def func(a,b,c=3):
#def test:
# return 2
cdef = A()
return test
class Intro(object):
def testing(self, string):
return string+","
class Supi(A, datetime.datetime):
r""" test123 """
class 2
static_var = 0
def __init__(self):
self.b = A()
def test(self):
import time
print 1
self.a = 1
self.b = (1,
2,[3,2
])
self.c = {1:3,
a = self.a
4:2,5:9}
return A()
class A():
class B():
def test(self):
return A()
class init:
def __init__(self, a, b=3, c = A):
self.a = a
a = A()
b = a.test()
c = a or b
c = a or c
class Empty():
pass
#def blub():
cdef = 5
cdef cdef
for i in range(3):
asdf = aaa
print 'blub'
else:
a = 0
def ass_test(a):
"""docstring for assignment test"""
a -= 1
# (comment without indent)
(b, c, d) = (1,2,3)
del b
f = {}
exec 'a = 999' in f
# test strange statements
[a,c] ; {1: a}; (1,); `a`
result = int((a+b)*2)
global global_test
return result
matrix = [[1,2,3], [4,5,6], [7,8,9]]
def flow_test(a):
global matrix
for i in matrix:
print a
else:
pass
while 1:
del a
print a
else:
pass
try:
if True or a:
m = 1
for i,j in enumerate(range(3)):
print i,j
for a in test(t):
p
else:
while 1:
m = 2
break
except IndexError as e:
raise e
yield e
except TypeError, e2:
pass
except:
pass
finally:
pass
with open('test.py') as f, open('narf.py' as g), m as cm:
print f
return matrix[0,m]
if True or a:
print a