@@ -21,52 +21,25 @@ setUp () {
21
21
rm -f " $test_dir /catch_output"
22
22
}
23
23
24
- test_rmvirtualenv () {
24
+ test_remove () {
25
25
mkvirtualenv " deleteme"
26
26
assertTrue " [ -d $WORKON_HOME /deleteme ]"
27
27
deactivate
28
28
rmvirtualenv " deleteme"
29
29
assertFalse " [ -d $WORKON_HOME /deleteme ]"
30
30
}
31
31
32
- test_rmvirtualenv_no_such_env () {
32
+ test_no_such_env () {
33
33
assertFalse " [ -d $WORKON_HOME /deleteme ]"
34
34
assertTrue " rmvirtualenv deleteme"
35
35
}
36
36
37
- test_add2virtualenv () {
38
- mkvirtualenv " pathtest"
39
- add2virtualenv " /full/path"
40
- cdsitepackages
41
- path_file=" ./virtualenv_path_extensions.pth"
42
- assertTrue " No /full/path in ` cat $path_file ` " " grep /full/path $path_file "
43
- cd -
44
- }
45
-
46
- test_add2virtualenv_relative () {
47
- mkvirtualenv " pathtest"
48
- parent_dir=$( dirname $( pwd) )
49
- base_dir=$( basename $( pwd) )
50
- add2virtualenv " ../$base_dir "
51
- cdsitepackages
52
- path_file=" ./virtualenv_path_extensions.pth"
53
- assertTrue " No $parent_dir /$base_dir in \" ` cat $path_file ` \" " " grep \" $parent_dir /$base_dir \" $path_file "
54
- cd - > /dev/null 2>&1
55
- }
56
-
57
- test_lssitepackages () {
58
- mkvirtualenv " lssitepackagestest"
59
- contents=" $( lssitepackages) "
60
- assertTrue " No easy-install.pth in $contents " " echo $contents | grep easy-install.pth"
61
- }
62
-
63
- test_lssitepackages_add2virtualenv () {
64
- mkvirtualenv " lssitepackagestest"
65
- parent_dir=$( dirname $( pwd) )
66
- base_dir=$( basename $( pwd) )
67
- add2virtualenv " ../$base_dir "
68
- contents=" $( lssitepackages) "
69
- assertTrue " No $base_dir in $contents " " echo $contents | grep $base_dir "
37
+ test_no_workon_home () {
38
+ old_home=" $WORKON_HOME "
39
+ export WORKON_HOME=" $WORKON_HOME /not_there"
40
+ output=` rmvirtualenv should_not_be_created 2>&1 `
41
+ assertTrue " Did not see expected message" " echo $output | grep 'does not exist'"
42
+ WORKON_HOME=" $old_home "
70
43
}
71
44
72
45
0 commit comments