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 stripped = stripped.parent
if isinstance(stripped, pr.Name): if isinstance(stripped, pr.Name):
stripped = stripped.parent stripped = stripped.parent
if isinstance(stripped, iterable.Array):
return 'instance'
return type(stripped).__name__.lower().replace('wrapper', '') return type(stripped).__name__.lower().replace('wrapper', '')
def _path(self): def _path(self):

View File

@@ -51,7 +51,7 @@ func()
assert [] assert []
def focus_return(): def focus_return():
#? list #? list()
return [] return []
@@ -163,7 +163,7 @@ def listen(arg):
x x
listen(['' for x in [1]]) listen(['' for x in [1]])
#? str() #? str
([str for x in []])[0] ([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='') exe = fu(list, c=set, b=3, d='')
#? list() #? list
exe[0] exe[0]
#? int() #? int()
exe[1] exe[1]
@@ -63,7 +63,7 @@ def fu2(a, b, c, *args, **kwargs):
exe = fu2(list, c=set, b=3, d='str') exe = fu2(list, c=set, b=3, d='str')
#? list() #? list
exe[0] exe[0]
#? int() #? int()
exe[1] exe[1]

View File

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

View File

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

View File

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

View File

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

View File

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