5
test_dir=$(cd $(dirname $0) && pwd)
7
export WORKON_HOME="$(echo ${TMPDIR:-/tmp}/WORKON_HOME | sed 's|//|/|g')"
11
mkdir -p "$WORKON_HOME"
12
source "$test_dir/../virtualenvwrapper.sh"
22
rm -f "$test_dir/catch_output"
27
assertNotNull "$VIRTUAL_ENV"
29
assertNull "$VIRTUAL_ENV"
30
assertFalse virtualenvwrapper_verify_active_environment
33
test_deactivate_hooks () {
38
echo "echo GLOBAL ${t}deactivate \$VIRTUALENVWRAPPER_LAST_VIRTUAL_ENV >> $test_dir/catch_output" > "$WORKON_HOME/${t}deactivate"
39
echo "echo ENV ${t}deactivate \$VIRTUALENVWRAPPER_LAST_VIRTUAL_ENV >> $test_dir/catch_output" > "$WORKON_HOME/env1/bin/${t}deactivate"
42
touch "$test_dir/catch_output"
46
output=$(cat "$test_dir/catch_output")
47
expected="ENV predeactivate
49
ENV postdeactivate $WORKON_HOME/env1
50
GLOBAL postdeactivate $WORKON_HOME/env1"
51
assertSame "$expected" "$output"
55
rm -f "$WORKON_HOME/env1/bin/${t}activate"
56
rm -f "$WORKON_HOME/${t}activate"