Add virtual_env unit test

This commit is contained in:
Ilan Cosman 2020-07-10 22:18:47 -07:00
parent 6bb2225a89
commit d77ec252d4
2 changed files with 24 additions and 1 deletions

View File

@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Install dependencies - name: Install dependencies
run: sudo apt install -y fish curl git run: sudo apt install -y fish curl git python
- name: Install Tide as dev unattended - name: Install Tide as dev unattended
shell: fish {0} shell: fish {0}

23
tests/virtual_env.fish Normal file
View File

@ -0,0 +1,23 @@
@mesg '---------virtual_env---------'
function _virtual_env
_tide_decolor (_tide_item_virtual_env)
end
set -l dir ~/python_project
mkdir -p $dir
cd $dir
@test 'nothing' (_virtual_env) -z
python -m venv .venv
source .venv/bin/activate.fish
set -lx tide_virtual_env_display projectName
@test 'projectName' (_virtual_env) = 'python_project'
set -lx tide_virtual_env_display venvName
@test 'venvName' (_virtual_env) = '.venv'
rm -r $dir