Created
June 2, 2016 10:25
-
-
Save florent-babylon/b2a843b82f05edb6bd3d398917ef17a7 to your computer and use it in GitHub Desktop.
Python TDD on steroids
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dependencies: | |
# brew install terminal-notifier | |
# Run the tests and notifies of success or failure. | |
# NB - the icons are optional, remove the whole "-appIcon $path" if you don't need them. | |
NOTIF=/Applications/terminal-notifier.app/Contents/MacOS/terminal-notifier | |
python -m unittest test/test_*_model.py | |
if [ $? = 0 ] | |
then | |
echo "✔ All tests ok" | $NOTIF -title "Tests passing" -appIcon ~/misc/icons/ok.png | |
else | |
echo "✘ Tests failing" | $NOTIF -title "Tests failing" -appIcon ~/misc/icons/broken.png | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dependencies: | |
# brew install fswatch | |
# Watches the filesystem every .1 second on file changes and execute the tests when an event occurs | |
fswatch -o --event Created --event Updated --event Renamed --event Removed --exclude ".git" --latency 0.1 . | xargs -n1 ./testrunner.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment