mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-07 09:00:57 +08:00
sys path modifications
This commit is contained in:
22
test/completion/sys_path.py
Normal file
22
test/completion/sys_path.py
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
import sys
|
||||
import os
|
||||
from os import dirname
|
||||
|
||||
sys.path.insert(0, '../..')
|
||||
sys.path.append(dirname(os.path.abspath('thirdparty' + os.path.sep + 'asdf')))
|
||||
|
||||
# modifications, that should fail:
|
||||
# because of sys module
|
||||
sys.path.append(sys.path[1] + '/thirdparty')
|
||||
# syntax err
|
||||
sys.path.append('a' +* '/thirdparty')
|
||||
|
||||
#? ['evaluate']
|
||||
import evaluate
|
||||
|
||||
#? ['goto']
|
||||
evaluate.goto
|
||||
|
||||
#? ['pylab_']
|
||||
import pylab_
|
||||
@@ -12,6 +12,8 @@ from _compatibility import unicode, BytesIO, reduce, literal_eval, is_py25
|
||||
import functions
|
||||
import debug
|
||||
|
||||
sys.path.pop() # pop again, because it might affect the completion
|
||||
|
||||
|
||||
def run_completion_test(correct, source, line_nr, index, line, path):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user