diff --git a/test/completion/classes.py b/test/completion/classes.py index 3ec98dd6..146fad1d 100644 --- a/test/completion/classes.py +++ b/test/completion/classes.py @@ -50,15 +50,15 @@ inst.var #? ['var_class', 'var_func'] TestClass.var -#? ['real'] -inst.var_local.real +#? int() +inst.var_local #? [] -TestClass.var_local.real +TestClass.var_local. -#? ['real'] -TestClass().ret(1).real -#? ['real'] -inst.ret(1).real +#? int() +TestClass().ret(1) +#? int() +inst.ret(1) myclass = TestClass(1, '', 3.0) #? int() @@ -67,8 +67,8 @@ myclass.get_first() myclass.get_first.real # too many params -#? ['real'] -TestClass(1,1,1).var_inst.real +#? int() +TestClass(1,1,1).var_inst # too few params #? int() @@ -85,10 +85,10 @@ myclass.second_new # multiple classes / ordering ints = TestClass(1, 1.0) strs = TestClass("", '') -#? ['real'] -ints.second.real -#? ['upper'] -strs.second.upper +#? float() +ints.second +#? str() +strs.second #? ['var_class'] TestClass.var_class.var_class.var_class.var_class diff --git a/test/completion/ordering.py b/test/completion/ordering.py index 12128d17..a63abecd 100644 --- a/test/completion/ordering.py +++ b/test/completion/ordering.py @@ -4,33 +4,27 @@ a = "" a = 1 -#? ['real'] -a.real -#? [] -a.upper +#? int() +a #? [] a.append a = list b = 1; b = "" -#? ['upper'] -b.upper -#? [] -b.real +#? str() +b a = 1 temp = b; b = a a = temp -#? ['real'] -b.real -#? [] -b.upper -#? [] -a.real -#? ['upper'] -a.upper +#? int() +b +#? int() +b +#? str() +a a = tuple if 1: @@ -45,51 +39,35 @@ a.index # tuples exchanges # ----------------- a, b = 1, "" -#? ['real'] -a.real -#? [] -a.upper -#? [] -b.real -#? ['upper'] -b.upper +#? int() +a +#? str() +b b, a = a, b -#? ['real'] -b.real -#? [] -b.upper -#? [] -a.real -#? ['upper'] -a.upper +#? int() +b +#? str() +a b, a = a, b -#? ['real'] -a.real -#? [] -a.upper -#? [] -b.real -#? ['upper'] -b.upper +#? int() +a +#? str() +b # ----------------- # function stuff # ----------------- def a(a=3): - #? ['real'] - a.real - #? [] - a.upper + #? int() + a #? [] a.func return a -#? ['real'] -a(2).real -#? [] -a(2).upper +#? int() +a(2) #? [] a(2).func # ----------------- @@ -98,22 +76,16 @@ a(2).func class A(object): a = "" a = 3 - #? ['real'] - a.real - #? [] - a.upper - #? [] - a.append + #? int() + a + # TODO remove this line!! a = list() def __init__(self): self.b = "" self.b = 3 - #? ['real'] - self.b.real - ##? [] - self.b.upper - ##? [] - self.b.append + # TODO should this be so? + #? int() str() list() + self.b self.b = list @@ -147,12 +119,8 @@ a.append #? [] a.real -#? ['append'] -a.a.append -#? ['real'] -a.a.real -#? ['upper'] -a.a.upper +#? list() str() int() +a.a # ----------------- # class stuff @@ -166,8 +134,8 @@ math.cosh math.real math = 3 -#? ['real'] -math.real +#? int() +math #? [] math.cos @@ -180,5 +148,5 @@ from math import * cosh.real cosh = 3 -#? ['real'] -cosh.real +#? int() +cosh diff --git a/test/completion/types.py b/test/completion/types.py index 5e43c0df..932555e3 100644 --- a/test/completion/types.py +++ b/test/completion/types.py @@ -54,8 +54,8 @@ dic2 = {'asdf': 3} #? ['popitem'] dic2.popitem -#? ['real'] -dic2['asdf'].real +#? int() +dic2['asdf'] # ----------------- # set diff --git a/test/run.py b/test/run.py index f63f5670..029186d5 100755 --- a/test/run.py +++ b/test/run.py @@ -126,6 +126,9 @@ def test_dir(completion_test_dir, third_party=False): global tests_pass for f_name in os.listdir(completion_test_dir): if len(sys.argv) == 1 or [a for a in sys.argv[1:] if a in f_name]: + if sys.hexversion < 0x02060000 \ + and f_name in ['generators.py', 'types.py']: + continue if f_name.endswith(".py"): if third_party: try: