Skip to content

Commit

Permalink
More verbose output to show what's being tested.
Browse files Browse the repository at this point in the history
  • Loading branch information
msabramo committed May 4, 2012
1 parent 25b3f13 commit 782a566
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/test_activate.sh
Expand Up @@ -20,26 +20,44 @@ echo "$0: Activating ${TESTENV}..." 1>&2
source ${TESTENV}/bin/activate source ${TESTENV}/bin/activate
echo "$0: Activated ${TESTENV}." 1>&2 echo "$0: Activated ${TESTENV}." 1>&2


echo "$0: Checking value of \$VIRTUAL_ENV..." 1>&2

if [ "$VIRTUAL_ENV" != "${TESTENV}" ]; then if [ "$VIRTUAL_ENV" != "${TESTENV}" ]; then
echo "$0: Expected \$VIRTUAL_ENV to be set to \"${TESTENV}\"; actual value: \"${VIRTUAL_ENV}\"!" 1>&2 echo "$0: Expected \$VIRTUAL_ENV to be set to \"${TESTENV}\"; actual value: \"${VIRTUAL_ENV}\"!" 1>&2
exit 2 exit 2
fi 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 if [ "$(which python)" != "${TESTENV}/bin/python" ]; then
echo "$0: Expected \$(which python) to return \"${TESTENV}/bin/python\"; actual value: \"$(which python)\"!" 1>&2 echo "$0: Expected \$(which python) to return \"${TESTENV}/bin/python\"; actual value: \"$(which python)\"!" 1>&2
exit 3 exit 3
fi 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 if [ "$(which pip)" != "${TESTENV}/bin/pip" ]; then
echo "$0: Expected \$(which pip) to return \"${TESTENV}/bin/pip\"; actual value: \"$(which pip)\"!" 1>&2 echo "$0: Expected \$(which pip) to return \"${TESTENV}/bin/pip\"; actual value: \"$(which pip)\"!" 1>&2
exit 4 exit 4
fi 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 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 echo "$0: Expected \$(which easy_install) to return \"${TESTENV}/bin/easy_install\"; actual value: \"$(which easy_install)\"!" 1>&2
exit 5 exit 5
fi 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__ TESTENV=${TESTENV} python <<__END__
import os, sys import os, sys
Expand All @@ -56,6 +74,8 @@ if [ $? -ne 0 ]; then
exit 6 exit 6
fi fi


echo "$0: Execution of a simple Python program -- OK." 1>&2

echo "$0: Testing pydoc..." 1>&2 echo "$0: Testing pydoc..." 1>&2


if ! PAGER=cat pydoc pydoc_test | grep 'This is pydoc_test.py' > /dev/null; then if ! PAGER=cat pydoc pydoc_test | grep 'This is pydoc_test.py' > /dev/null; then
Expand Down

0 comments on commit 782a566

Please sign in to comment.