From 620ec32da15acaa0a395abb03dbcb47504a645fb Mon Sep 17 00:00:00 2001 From: Bailey Stoner Date: Wed, 11 Oct 2017 13:42:38 -0700 Subject: [PATCH] Add a test to ensure $VIRTUAL_ENV is respected. --- test/test_python_virtualenv.vader | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/test_python_virtualenv.vader 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'