fixed some bugs related to func param display

This commit is contained in:
David Halter
2012-09-15 17:33:18 +02:00
parent 24d86c72a0
commit 60e8f57c32
3 changed files with 42 additions and 12 deletions

View File

@@ -113,16 +113,21 @@ class TestRegression(unittest.TestCase):
def test_get_in_function_call(self):
s = "isinstance(a, abs("
s2 = "isinstance(), "
s3 = "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(s2, (1, 11)), 0) # TODO uncomment
assert check(self.get_in_function_call(s2, (1, 11)), 0)
assert self.get_in_function_call(s2, (1, 12)) is None
assert self.get_in_function_call(s2) is None
assert self.get_in_function_call(s3, (1, 12)) is None
assert self.get_in_function_call(s3) is None
if __name__ == '__main__':
unittest.main()