#!/bin/sh
# Run tests
echo -e "\e[0;34mRunning test suite...\e[0m"
cd 'test' || exit 1
coverage run --source .,../pyautoupdate -m pytest
test_exit=$?
coverage report
cd ..
echo -e "\e[0;34mDone running tests\e[0m"
# Ensure that package installs properly
echo -e "\e[0;35mInstalling package...\e[0m"
python setup.py develop || exit 1
echo -e "\e[0;35mDone installing\e[0m"
echo -e "\e[0;35mAttempting to import package from python...\e[0m"
python -c "import pyautoupdate" && echo -e "\e[0;32mInstallation successful\e0m]"
install_exit=$?
echo -e "\e[0;35mCleaning up...\e[0m"
python setup.py develop --uninstall
if [ $test_exit = 0 ] && [ $install_exit = 0]; then
    exit 0
else
    exit 1
fi

#!/bin/sh
# Run tests
echo -e "\e[0;34mRunning test suite...\e[0m"
cd 'test' || exit 1
coverage run --source .,../pyautoupdate -m pytest
test_exit=$?
coverage report
cd ..
echo -e "\e[0;34mDone running tests\e[0m"
# Ensure that package installs properly
echo -e "\e[0;35mInstalling package...\e[0m"
python setup.py develop || exit 1
echo -e "\e[0;35mDone installing\e[0m"
echo -e "\e[0;35mAttempting to import package from python...\e[0m"
python -c "import pyautoupdate" && echo -e "\e[0;32mInstallation successful\e[0m"
install_exit=$?
echo -e "\e[0;35mCleaning up...\e[0m"
python setup.py develop --uninstall
if [ $test_exit = 0 ] && [ $install_exit = 0]; then
    exit 0
else
    exit 1
fi

Remove trailig 0m] caused by incorrect escape sequence
Remove trailig 0m] caused by incorrect escape sequence
