@@ -7,7 +7,7 @@ setUp () {
77 rm -rf " $WORKON_HOME "
88 mkdir -p " $WORKON_HOME "
99 source " $test_dir /../virtualenvwrapper.sh"
10- rm -f " $test_dir /catch_output"
10+ rm -f " $TMPDIR /catch_output"
1111 echo
1212}
1313
@@ -107,27 +107,25 @@ test_source_does_not_exist () {
107107test_hooks () {
108108 mkvirtualenv " source" > /dev/null 2>&1
109109
110- export pre_test_dir=$( cd " $test_dir " ; pwd)
111-
112110 # Set the interpreter of the hook script to the simple shell
113111 echo " #!/bin/sh" > " $WORKON_HOME /premkvirtualenv"
114- echo " echo GLOBAL premkvirtualenv \` pwd\` \"\$ @\" >> \" $pre_test_dir /catch_output\" " >> " $WORKON_HOME /premkvirtualenv"
112+ echo " echo GLOBAL premkvirtualenv \` pwd\` \"\$ @\" >> \" $TMPDIR /catch_output\" " >> " $WORKON_HOME /premkvirtualenv"
115113 chmod +x " $WORKON_HOME /premkvirtualenv"
116114
117- echo " echo GLOBAL postmkvirtualenv >> $test_dir /catch_output" > " $WORKON_HOME /postmkvirtualenv"
115+ echo " echo GLOBAL postmkvirtualenv >> $TMPDIR /catch_output" > " $WORKON_HOME /postmkvirtualenv"
118116
119117 # Set the interpreter of the hook script to the simple shell
120118 echo " #!/bin/sh" > " $WORKON_HOME /precpvirtualenv"
121- echo " echo GLOBAL precpvirtualenv \` pwd\` \"\$ @\" >> \" $pre_test_dir /catch_output\" " >> " $WORKON_HOME /precpvirtualenv"
119+ echo " echo GLOBAL precpvirtualenv \` pwd\` \"\$ @\" >> \" $TMPDIR /catch_output\" " >> " $WORKON_HOME /precpvirtualenv"
122120 chmod +x " $WORKON_HOME /precpvirtualenv"
123121
124122 # Set the interpreter of the hook script to the simple shell
125123 echo " #!/bin/sh" > " $WORKON_HOME /postcpvirtualenv"
126- echo " echo GLOBAL postcpvirtualenv >> $test_dir /catch_output" > " $WORKON_HOME /postcpvirtualenv"
124+ echo " echo GLOBAL postcpvirtualenv >> $TMPDIR /catch_output" > " $WORKON_HOME /postcpvirtualenv"
127125
128126 cpvirtualenv " source" " destination" > /dev/null 2>&1
129127
130- output=$( cat " $test_dir /catch_output" )
128+ output=$( cat " $TMPDIR /catch_output" )
131129 workon_home_as_pwd=$( cd $WORKON_HOME ; pwd)
132130
133131 expected=" GLOBAL precpvirtualenv $workon_home_as_pwd $workon_home_as_pwd /source destination
0 commit comments