diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 7712a59..5ecc7eb 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -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} diff --git a/tests/virtual_env.fish b/tests/virtual_env.fish new file mode 100644 index 0000000..8dfa94b --- /dev/null +++ b/tests/virtual_env.fish @@ -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 \ No newline at end of file