From 862fbbc8a9eec2d1340fcd2b5ba0dfbe24087ec8 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Sat, 1 Aug 2020 11:16:57 +0200 Subject: [PATCH] Add a choose-venv test --- test/vspec/choose-venv.vim | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 test/vspec/choose-venv.vim diff --git a/test/vspec/choose-venv.vim b/test/vspec/choose-venv.vim new file mode 100644 index 0000000..3c2c6ac --- /dev/null +++ b/test/vspec/choose-venv.vim @@ -0,0 +1,29 @@ +source plugin/jedi.vim +source test/_utils.vim + +describe 'simple:' + before + new + normal! ifoo + end + + after + bd! + end + + it 'choose' + Expect g:jedi#environment_path == 'auto' + Expect bufname() == '' + + JediChooseEnvironment + " A Python executable needs to be a few letters + Expect len(getline('.')) > 5 + Expect bufname() == 'Hit Enter to Choose an Environment' + + execute "normal \" + Expect g:jedi#environment_path != 'auto' + bd " TODO why is this necessary? There seems to be a random buffer. + Expect bufname() == '' + Expect getline('.') == 'foo' + end +end