2017-10-11 20:42:38 +00:00
|
|
|
Before:
|
|
|
|
Save $VIRTUAL_ENV
|
|
|
|
let $VIRTUAL_ENV = "/opt/example/"
|
|
|
|
|
|
|
|
After:
|
|
|
|
Restore
|
|
|
|
|
|
|
|
Execute(ale#python#FindVirtualenv falls back to $VIRTUAL_ENV when no directories match):
|
|
|
|
AssertEqual
|
|
|
|
\ ale#python#FindVirtualenv(bufnr('%')),
|
|
|
|
\ '/opt/example/',
|
|
|
|
\ 'Expected VIRTUAL_ENV environment variable to be used, but it was not'
|
2023-03-07 01:59:05 +00:00
|
|
|
|
|
|
|
Execute(ale#python#AutoVirtualenvEnvString should return the correct values):
|
|
|
|
if has('win32')
|
|
|
|
AssertEqual
|
|
|
|
\ 'set PATH=/opt/example/;%PATH% && ',
|
|
|
|
\ ale#python#AutoVirtualenvEnvString(bufnr(''))
|
|
|
|
else
|
|
|
|
AssertEqual
|
|
|
|
\ 'PATH=''/opt/example/''":$PATH" ',
|
|
|
|
\ ale#python#AutoVirtualenvEnvString(bufnr(''))
|
|
|
|
endif
|