mirror of
https://github.com/IlanCosman/tide.git
synced 2024-12-23 12:03:48 +03:00
Add virtual_env unit test
This commit is contained in:
parent
6bb2225a89
commit
d77ec252d4
2
.github/workflows/CI.yaml
vendored
2
.github/workflows/CI.yaml
vendored
@ -11,7 +11,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- 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
|
||||
shell: fish {0}
|
||||
|
23
tests/virtual_env.fish
Normal file
23
tests/virtual_env.fish
Normal 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
|
Loading…
Reference in New Issue
Block a user