1# -*- mode: shell-script -*- 2 3test_dir=$(cd $(dirname $0) && pwd) 4source "$test_dir/setup.sh" 5 6oneTimeSetUp() { 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 13oneTimeTearDown() { 14 rm -rf "$WORKON_HOME" 15} 16 17setUp () { 18 echo 19} 20 21test_workon_changes_defs() { 22 # See issue #144 23 assertFalse "virtualenvwrapper_run_hook is already defined" "type virtualenvwrapper_run_hook" 24 workon lazy_load_test >/dev/null 2>&1 25 assertTrue "virtualenvwrapper_run_hook is not defined" "type virtualenvwrapper_run_hook" 26 assertTrue "workon still set to run lazy loader" "typeset -f $name | grep 'virtualenvwrapper_load'" 27} 28 29. "$test_dir/shunit2" 30