forked from VimPlug/jedi
fix a sith problem with empty files
This commit is contained in:
4
sith.py
4
sith.py
@@ -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)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user