if [ -z "$SAGE_LOCAL" ]; then
    echo "SAGE_LOCAL undefined - exiting..."
    echo "Maybe run 'sage -sh'?"
    exit 1
fi

cd src

nosetests functional_tests
if [ $? -ne 0 ]; then
    echo "Error running functional_tests."
    exit 1
fi
nosetests unit_tests
if [ $? -ne 0 ]; then
    echo "Error running unit_tests."
    exit 1
fi
