blob: cb49d3155ff04afa9d0bc786a9508cc1a3a97d80 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
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
|