mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 06:44:46 +08:00
fixed sys_path test
This commit is contained in:
@@ -261,12 +261,14 @@ def sys_path_with_modifications(module):
|
|||||||
res = execute_code(exe.get_code())
|
res = execute_code(exe.get_code())
|
||||||
if res is not None:
|
if res is not None:
|
||||||
sys_path.insert(0, res)
|
sys_path.insert(0, res)
|
||||||
|
debug.dbg('sys path inserted: %s' % res)
|
||||||
exe.type = exe_type
|
exe.type = exe_type
|
||||||
exe.values.insert(0, exe_pop)
|
exe.values.insert(0, exe_pop)
|
||||||
elif array_cmd == 'append':
|
elif array_cmd == 'append':
|
||||||
res = execute_code(exe.get_code())
|
res = execute_code(exe.get_code())
|
||||||
if res is not None:
|
if res is not None:
|
||||||
sys_path.append(res)
|
sys_path.append(res)
|
||||||
|
debug.dbg('sys path added: %s' % res)
|
||||||
return sys_path
|
return sys_path
|
||||||
|
|
||||||
curdir = os.path.abspath(os.curdir)
|
curdir = os.path.abspath(os.curdir)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import sys
|
|||||||
import os
|
import os
|
||||||
from os import dirname
|
from os import dirname
|
||||||
|
|
||||||
sys.path.insert(0, '../..')
|
sys.path.insert(0, '../../jedi')
|
||||||
sys.path.append(dirname(os.path.abspath('thirdparty' + os.path.sep + 'asdf')))
|
sys.path.append(dirname(os.path.abspath('thirdparty' + os.path.sep + 'asdf')))
|
||||||
|
|
||||||
# modifications, that should fail:
|
# modifications, that should fail:
|
||||||
|
|||||||
Reference in New Issue
Block a user