File tree Expand file tree Collapse file tree 2 files changed +30
-17
lines changed Expand file tree Collapse file tree 2 files changed +30
-17
lines changed Original file line number Diff line number Diff line change @@ -88,21 +88,4 @@ test_mktmpenv_defined_lazy() {
88
88
function_defined_lazy mktmpenv
89
89
}
90
90
91
-
92
- # test_virtualenvwrapper_initialize() {
93
- # assertTrue "Initialized" virtualenvwrapper_initialize
94
- # for hook in premkvirtualenv postmkvirtualenv prermvirtualenv postrmvirtualenv preactivate postactivate predeactivate postdeactivate
95
- # do
96
- # assertTrue "Global $WORKON_HOME/$hook was not created" "[ -f $WORKON_HOME/$hook ]"
97
- # assertTrue "Global $WORKON_HOME/$hook is not executable" "[ -x $WORKON_HOME/$hook ]"
98
- # done
99
- # assertTrue "Log file was not created" "[ -f $WORKON_HOME/hook.log ]"
100
- # export pre_test_dir=$(cd "$test_dir"; pwd)
101
- # echo "echo GLOBAL initialize >> \"$pre_test_dir/catch_output\"" >> "$WORKON_HOME/initialize"
102
- # virtualenvwrapper_initialize
103
- # output=$(cat "$test_dir/catch_output")
104
- # expected="GLOBAL initialize"
105
- # assertSame "$expected" "$output"
106
- # }
107
-
108
91
. " $test_dir /shunit2"
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ test_dir=$( cd $( dirname $0 ) && pwd)
4
+ source " $test_dir /setup.sh"
5
+
6
+ oneTimeSetUp () {
7
+ rm -rf " $WORKON_HOME "
8
+ mkdir -p " $WORKON_HOME "
9
+ (cd " $WORKON_HOME " && virtualenv lazy_load_test > /dev/null 2>&1 )
10
+ source " $test_dir /../virtualenvwrapper_lazy.sh"
11
+ }
12
+
13
+ oneTimeTearDown () {
14
+ rm -rf " $WORKON_HOME "
15
+ }
16
+
17
+ setUp () {
18
+ echo
19
+ rm -f " $test_dir /catch_output"
20
+ }
21
+
22
+ test_workon_changes_defs () {
23
+ # See issue #144
24
+ assertFalse " virtualenvwrapper_run_hook is already defined" " type virtualenvwrapper_run_hook"
25
+ workon lazy_load_test > /dev/null 2>&1
26
+ assertTrue " virtualenvwrapper_run_hook is not defined" " type virtualenvwrapper_run_hook"
27
+ assertTrue " workon still set to run lazy loader" " typeset -f $name | grep 'virtualenvwrapper_load'"
28
+ }
29
+
30
+ . " $test_dir /shunit2"
You can’t perform that action at this time.
0 commit comments