ale/test/test_python_virtualenv.vader

24 lines
661 B
Plaintext
Raw Permalink Normal View History

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'
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