Skip to content

Instantly share code, notes, and snippets.

@rroemhild
Created February 9, 2010 09:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rroemhild/299059 to your computer and use it in GitHub Desktop.
Save rroemhild/299059 to your computer and use it in GitHub Desktop.
sample shell script to test python modules
#!/bin/sh
pymod_test()
{
echo -n "Testing python module $1: "
python -c "import $1" 2> /dev/null
retval=$?
if [ "$retval" -eq "0" ]; then
echo "Ok"
else
echo "Fail"
exit 1
fi
}
pymods="sys sysde"
for pymod in $pymods; do
pymod_test $pymod
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment