From ff9ef84a84f490030545f290f406d09c0bc98feb Mon Sep 17 00:00:00 2001 From: David Halter Date: Mon, 7 May 2012 23:31:33 +0200 Subject: [PATCH] tests again -> complicated working --- evaluate.py | 3 --- functions.py | 1 - test/completion/functions.py | 14 ++++++++++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/evaluate.py b/evaluate.py index 29a3fbbb..c6669c18 100644 --- a/evaluate.py +++ b/evaluate.py @@ -229,7 +229,6 @@ class Executable(object): return next(self.iterator) print 'va', self.var_args - #print 'va2', self.var_args[0] return iter(PushBackIterator(iterate())) @@ -697,12 +696,10 @@ def follow_call_list(scope, call_list): It is used to evaluate a two dimensional object, that has calls, arrays and operators in it. """ - print 'inpu', scope, call_list if parsing.Array.is_type(call_list, parsing.Array.TUPLE, parsing.Array.DICT): # Tuples can stand just alone without any braces. These would be # recognized as separate calls, but actually are a tuple. - print 'inpu', scope, call_list result = follow_call(scope, call_list) else: result = [] diff --git a/functions.py b/functions.py index 69f55cf9..cd8da39d 100644 --- a/functions.py +++ b/functions.py @@ -205,7 +205,6 @@ def complete(source, row, column, source_path): for s in scopes: # TODO is this reall the right way? just ignore the functions? \ # do the magic functions first? and then recheck here? - print 'scope, ' if not isinstance(s, parsing.Function): completions += s.get_defined_names() diff --git a/test/completion/functions.py b/test/completion/functions.py index cc084370..6e829758 100644 --- a/test/completion/functions.py +++ b/test/completion/functions.py @@ -155,5 +155,15 @@ def fu(a=1, b="", *args, **kwargs): exe = fu(list, 1, "", c=set) -##? ['append'] -exe[0]. +#? ['append'] +exe[0].append +#? ['real'] +exe[1].real +#? ['index'] +exe[2].index +#? ['upper'] +exe[2][0].upper +#? ['items'] +exe[3].items +#? ['union'] +exe[3]['c'].union