1
0
forked from VimPlug/jedi

added tests

This commit is contained in:
David Halter
2012-04-13 10:39:02 +02:00
parent 5f21f56330
commit ee3aea95e2
4 changed files with 89 additions and 8 deletions

View File

@@ -0,0 +1,18 @@
class TestClass(object):
var_class = TestClass()
def __init__(self2, a):
self2.var_inst = a
inst = TestClass(1)
#? ['var_class', 'var_inst']
inst.var
#? ['var_class']
TestClass.var_class

View File

@@ -1,7 +1,7 @@
import os
def array():
return []
return list()
#? ['append']
array().app

48
test/completion/types.py Normal file
View File

@@ -0,0 +1,48 @@
# -----------------
# lists
# -----------------
arr = []
#? ['append']
arr().app
#? ['append']
list().app
# -----------------
# dicts
# -----------------
dic = {}
#? ['clear', 'copy']
dic.c
dic2 = dict(a=1, b=2)
#? ['pop', 'popitem']
dic2.p
# -----------------
# set
# -----------------
set_t = {1,2}
#? ['clear', 'copy']
set_t.c
set_t2 = set()
#? ['clear', 'copy']
set_t2.c
# -----------------
# tuples
# -----------------
tup = ('',2)
#? ['count']
tup.c
tup2 = tuple()
#? ['index']
tup2.i