1
0
forked from VimPlug/jedi

fix a sith problem with empty files

This commit is contained in:
David Halter
2013-07-19 00:15:09 +02:00
parent 29f89cc75a
commit a7cfb89c2a

View File

@@ -89,7 +89,9 @@ class TestCase(object):
source = f.read() source = f.read()
lines = source.splitlines() lines = source.splitlines()
line = random.randint(1, max(len(lines), 1)) if not lines:
lines = ['']
line = random.randint(1, len(lines))
column = random.randint(0, len(lines[line - 1])) column = random.randint(0, len(lines[line - 1]))
return cls(operation, path, line, column) return cls(operation, path, line, column)