summaryrefslogtreecommitdiff
path: root/test/test_python_virtualenv.vader
diff options
context:
space:
mode:
authorBailey Stoner <bailey@patreon.com>2017-10-11 13:42:38 -0700
committerBailey Stoner <bailey@patreon.com>2017-10-11 13:42:38 -0700
commit620ec32da15acaa0a395abb03dbcb47504a645fb (patch)
tree4fc3026362f6b1f488d1dc8befb79caf817cb1e4 /test/test_python_virtualenv.vader
parent3859ac0c9b17edd9776c5e9b42d0c13e4ee7eb42 (diff)
downloadale-620ec32da15acaa0a395abb03dbcb47504a645fb.zip
Add a test to ensure $VIRTUAL_ENV is respected.
Diffstat (limited to 'test/test_python_virtualenv.vader')
-rw-r--r--test/test_python_virtualenv.vader12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_python_virtualenv.vader b/test/test_python_virtualenv.vader
new file mode 100644
index 00000000..b44c5fa2
--- /dev/null
+++ b/test/test_python_virtualenv.vader
@@ -0,0 +1,12 @@
+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'