1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
#!/bin/sh
#set -x
test_dir=$(cd $(dirname $0) && pwd)
export WORKON_HOME="$(echo ${TMPDIR:-/tmp}/WORKON_HOME | sed 's|//|/|g')"
oneTimeSetUp() {
rm -rf "$WORKON_HOME"
mkdir -p "$WORKON_HOME"
source "$test_dir/../virtualenvwrapper.sh"
}
oneTimeTearDown() {
rm -rf "$WORKON_HOME"
rm -f "$test_dir/requirements.txt"
}
setUp () {
echo
rm -f "$test_dir/catch_output"
}
test_single_package () {
mkvirtualenv -i IPy "env4"
installed=$(pip freeze)
assertTrue "IPy not found in $installed" "pip freeze | grep IPy"
}
test_multiple_packages () {
mkvirtualenv -i IPy -i WebTest "env5"
installed=$(pip freeze)
assertTrue "IPy not found in $installed" "pip freeze | grep IPy"
assertTrue "WebTest not found in $installed" "pip freeze | grep WebTest"
}
. "$test_dir/shunit2"
|