This commit is contained in:
David Halter
2012-09-15 16:02:39 +02:00
parent 7e62c47f22
commit 9e7e5293d8
3 changed files with 39 additions and 33 deletions

View File

@@ -90,7 +90,7 @@ class TestRegression(unittest.TestCase):
assert len(s) == 1
assert list(s)[0].word == 'str'
s = self.complete("", (1,0))
s = self.complete("", (1, 0))
assert len(s) > 0
def test_get_definition_on_import(self):
@@ -115,13 +115,13 @@ class TestRegression(unittest.TestCase):
s2 = "isinstance(), "
check = lambda call_def, index: call_def and call_def.index == index
assert check(self.get_in_function_call(s, (1,11)), 0)
assert check(self.get_in_function_call(s, (1,14)), 1)
assert check(self.get_in_function_call(s, (1,15)), 1)
assert check(self.get_in_function_call(s, (1,18)), 0)
assert check(self.get_in_function_call(s, (1, 11)), 0)
assert check(self.get_in_function_call(s, (1, 14)), 1)
assert check(self.get_in_function_call(s, (1, 15)), 1)
assert check(self.get_in_function_call(s, (1, 18)), 0)
#assert check(self.get_in_function_call(s2, (1,11)), 0) # TODO uncomment
assert self.get_in_function_call(s2, (1,12)) is None
##assert check(self.get_in_function_call(s2, (1, 11)), 0) # TODO uncomment
assert self.get_in_function_call(s2, (1, 12)) is None
assert self.get_in_function_call(s2) is None
if __name__ == '__main__':