Diff
1diff --git a/tests/test_autoswitching.zunit b/tests/test_autoswitching.zunit
2deleted file mode 100644
3index fb8719f4a89b8d12a1debff0669079f079ed23bb..0000000000000000000000000000000000000000
4--- a/tests/test_autoswitching.zunit
5+++ /dev/null
6@@ -1,35 +0,0 @@
7-#!/usr/bin/env zunit
8-
9-@setup {
10- source =virtualenvwrapper.sh
11- load "../autoswitch_virtualenv.plugin.zsh"
12- target="$(mktemp -d)"
13- assert "$target" is_dir
14-
15- venv="$(pwgen 8 1)"
16- run mkvirtualenv "$venv"
17-}
18-
19-@teardown {
20- run rmvirtualenv "$venv"
21- rm -rf "$target"
22-}
23-
24-@test 'changing to a directory without .venv defaults' {
25- AUTOSWITCH_DEFAULTENV="mydefaultenv"
26-
27- run cd "$target"
28-
29- assert "$output" contains "Switching virtualenv: mydefaultenv"
30- assert $state equals 0
31-}
32-
33-@test 'changing to a directory with .venv autoswitches' {
34- echo "$venv" > "$target/.venv"
35- chmod 600 "$target/.venv"
36-
37- run cd "$target"
38-
39- assert "$output" contains "Switching virtualenv: $venv"
40- assert $state equals 0
41-}
42diff --git a/tests/test_check_venv_path.zunit b/tests/test_check_venv_path.zunit
43deleted file mode 100644
44index 1665d3850ae8c581cddd588fa0c7b9b8eff6002a..0000000000000000000000000000000000000000
45--- a/tests/test_check_venv_path.zunit
46+++ /dev/null
47@@ -1,50 +0,0 @@
48-#!/usr/bin/env zunit
49-
50-@setup {
51- load "../autoswitch_virtualenv.plugin.zsh"
52- source =virtualenvwrapper.sh
53- target="$(mktemp -d)"
54- assert "$target" is_dir
55-}
56-
57-@teardown {
58- rm -rf "$target"
59-}
60-
61-@test 'chpwd functions are loaded' {
62- assert 'check_venv' in $chpwd_functions
63-}
64-
65-@test '_check_venv_path with non-existent path' {
66- run _check_venv_path '/i/dont/exist'
67-
68- assert "$output" is_empty
69- assert $state equals 0
70-}
71-
72-@test '_check_venv_path with no venv' {
73- run _check_venv_path "$target"
74-
75- assert "$output" is_empty
76- assert $state equals 0
77-}
78-
79-@test '_check_venv_path with existing venv' {
80- touch "$target/.venv"
81- assert "$target/.venv" is_file
82-
83- run _check_venv_path "$target"
84-
85- assert "$output" same_as "$target/.venv"
86- assert $state equals 0
87-}
88-
89-@test '_check_venv_path in subdirectory with parent venv' {
90- touch "$target/.venv"
91- assert "$target/.venv" is_file
92-
93- run _check_venv_path "$target/src/examples"
94-
95- assert "$output" same_as "$target/.venv"
96- assert $state equals 0
97-}
98diff --git a/tests/test_rmvenv.zunit b/tests/test_rmvenv.zunit
99deleted file mode 100644
100index b7fd700fe44e22ce90a7082908340f768e54cecf..0000000000000000000000000000000000000000
101--- a/tests/test_rmvenv.zunit
102+++ /dev/null
103@@ -1,48 +0,0 @@
104-#!/usr/bin/env zunit
105-
106-@setup {
107- load "../autoswitch_virtualenv.plugin.zsh"
108- source =virtualenvwrapper.sh
109- target="$(mktemp -d)"
110- assert "$target" is_dir
111-}
112-
113-@teardown {
114- rm -rf "$teardown"
115-}
116-
117-@test 'rmvenv with no .venv' {
118- cd "$target"
119-
120- run rmvenv
121-
122- assert "$output" same_as "No .venv file in the current directory!"
123- assert $state equals 0
124-}
125-
126-@test 'rmvenv with existing .venv' {
127- run mkvirtualenv "oranges"
128- run deactivate
129-
130- cd "$target"
131- echo "oranges" > "$target/.venv"
132- chmod 600 "$target/.venv"
133- assert "$target/.venv" is_file
134-
135- run rmvenv
136-
137- assert "$output" same_as "Removing oranges..."
138- assert $state equals 0
139-}
140-
141-@test 'rmvenv with existing .venv with deleted virtualenv' {
142- echo "idontexist" > "$target/.venv"
143- chmod 600 "$target/.venv"
144- assert "$target/.venv" is_file
145-
146- cd "$target"
147- run rmvenv
148-
149- assert "$lines[1]" same_as "Removing idontexist..."
150- assert "$lines[2]" same_as "Did not find environment $HOME/.virtualenvs/idontexist to remove."
151-}