Browse files

More verbose output to show what's being tested.

  • Loading branch information...
1 parent 25b3f13 commit 782a566f4de3ccda3a0db6d90c7fbadf56ccde82 @msabramo msabramo committed May 4, 2012
Showing with 20 additions and 0 deletions.
  1. +20 −0 tests/test_activate.sh
View
20 tests/test_activate.sh
@@ -20,26 +20,44 @@ echo "$0: Activating ${TESTENV}..." 1>&2
source ${TESTENV}/bin/activate
echo "$0: Activated ${TESTENV}." 1>&2
+echo "$0: Checking value of \$VIRTUAL_ENV..." 1>&2
+
if [ "$VIRTUAL_ENV" != "${TESTENV}" ]; then
echo "$0: Expected \$VIRTUAL_ENV to be set to \"${TESTENV}\"; actual value: \"${VIRTUAL_ENV}\"!" 1>&2
exit 2
fi
+echo "$0: \$VIRTUAL_ENV = \"${VIRTUAL_ENV}\" -- OK." 1>&2
+
+echo "$0: Checking output of \$(which python)..." 1>&2
+
if [ "$(which python)" != "${TESTENV}/bin/python" ]; then
echo "$0: Expected \$(which python) to return \"${TESTENV}/bin/python\"; actual value: \"$(which python)\"!" 1>&2
exit 3
fi
+echo "$0: Output of \$(which python) is OK." 1>&2
+
+echo "$0: Checking output of \$(which pip)..." 1>&2
+
if [ "$(which pip)" != "${TESTENV}/bin/pip" ]; then
echo "$0: Expected \$(which pip) to return \"${TESTENV}/bin/pip\"; actual value: \"$(which pip)\"!" 1>&2
exit 4
fi
+echo "$0: Output of \$(which pip) is OK." 1>&2
+
+echo "$0: Checking output of \$(which easy_install)..." 1>&2
+
if [ "$(which easy_install)" != "${TESTENV}/bin/easy_install" ]; then
echo "$0: Expected \$(which easy_install) to return \"${TESTENV}/bin/easy_install\"; actual value: \"$(which easy_install)\"!" 1>&2
exit 5
fi
+echo "$0: Output of \$(which easy_install) is OK." 1>&2
+
+echo "$0: Executing a simple Python program..." 1>&2
+
TESTENV=${TESTENV} python <<__END__
import os, sys
@@ -56,6 +74,8 @@ if [ $? -ne 0 ]; then
exit 6
fi
+echo "$0: Execution of a simple Python program -- OK." 1>&2
+
echo "$0: Testing pydoc..." 1>&2
if ! PAGER=cat pydoc pydoc_test | grep 'This is pydoc_test.py' > /dev/null; then

0 comments on commit 782a566

Please sign in to comment.