change tests that provided wrong instance information

This commit is contained in:
Dave Halter
2014-07-31 15:16:24 +02:00
parent 50fa3a732d
commit d09279e0ad
8 changed files with 15 additions and 13 deletions

View File

@@ -148,6 +148,8 @@ class BaseDefinition(object):
stripped = stripped.parent
if isinstance(stripped, pr.Name):
stripped = stripped.parent
if isinstance(stripped, iterable.Array):
return 'instance'
return type(stripped).__name__.lower().replace('wrapper', '')
def _path(self):

View File

@@ -51,7 +51,7 @@ func()
assert []
def focus_return():
#? list
#? list()
return []
@@ -163,7 +163,7 @@ def listen(arg):
x
listen(['' for x in [1]])
#? str()
#? str
([str for x in []])[0]

View File

@@ -31,7 +31,7 @@ def fu(a, b, c, *args, **kwargs):
exe = fu(list, c=set, b=3, d='')
#? list()
#? list
exe[0]
#? int()
exe[1]
@@ -63,7 +63,7 @@ def fu2(a, b, c, *args, **kwargs):
exe = fu2(list, c=set, b=3, d='str')
#? list()
#? list
exe[0]
#? int()
exe[1]

View File

@@ -148,7 +148,7 @@ def both():
"""
return 23
#? str(), int()
#? str() int()
both()
class Test(object):

View File

@@ -237,7 +237,7 @@ exe = args_func(1, "", list)
exe[0]
#? tuple()
exe[1]
#? list()
#? list
exe[1][1]
@@ -306,7 +306,7 @@ def fu(a=1, b="", *args, **kwargs):
exe = fu(list, 1, "", c=set, d="")
#? list()
#? list
exe[0]
#? int()
exe[1]
@@ -316,7 +316,7 @@ exe[2]
exe[2][0]
#? dict()
exe[3]
#? set()
#? set
exe[3]['c']
# -----------------

View File

@@ -38,7 +38,7 @@ import datetime
def fooooo(obj):
if isinstance(obj, datetime.datetime):
#? datetime.datetime
#? datetime.datetime()
obj
@@ -48,7 +48,7 @@ def fooooo2(obj):
else:
return 1
#? int() datetime.datetime
#? int() datetime.datetime()
fooooo2('')

View File

@@ -103,8 +103,8 @@ class A(object):
def before(self):
self.b = 3
# TODO should this be so?
#? int() str() list()
# TODO should this be so? include entries after cursor?
#? int() str() list
self.b
self.b = list

View File

@@ -64,7 +64,7 @@ import weakref
#? int()
weakref.proxy(1)
#? weakref.ref
#? weakref.ref()
weakref.ref(1)
#? int()
weakref.ref(1)()