Skip to content

Commit

Permalink
fix a little import problem in regression tests
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhalter committed Dec 31, 2012
1 parent 8064268 commit 17bec92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions jedi/fast_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ def _parse(self, code):
parser_order = 0
for code_part in parts:
lines = code_part.count('\n')
# the parser is using additional newlines, therefore substract
if p is None or line_offset >= p.end_pos[0] - 2:
# check if code_part has already been parsed
h = hash(code_part)
Expand Down
5 changes: 3 additions & 2 deletions test/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import api
import debug

sys.path.pop() # pop again, because it might affect the completion
sys.path.pop(0) # pop again, because it might affect the completion


def run_completion_test(script, correct, line_nr):
Expand Down Expand Up @@ -215,10 +215,11 @@ def test_dir(completion_test_dir, thirdparty=False):
continue

if thirdparty:
lib = f_name.replace('_.py', '')
try:
# there is always an underline at the end.
# It looks like: completion/thirdparty/pylab_.py
__import__(f_name.replace('_.py', ''))
__import__(lib)
except ImportError:
summary.append('Thirdparty-Library %s not found.' %
f_name)
Expand Down

0 comments on commit 17bec92

Please sign in to comment.