Skip to content

Instantly share code, notes, and snippets.

@markchadwick
Created January 12, 2010 16:18
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 markchadwick/275317 to your computer and use it in GitHub Desktop.
Save markchadwick/275317 to your computer and use it in GitHub Desktop.
#!/bin/bash
WATCH_DIR=`pwd -P`
PATTERN="*.py"
TMPFILE=`mktemp /tmp/nosewatch-XXXXXXXX`
INOTIFY="inotifywait -e modify --fromfile $TMPFILE"
trap "rm -f $TMPFILE; exit" INT TERM EXIT
find $WATCH_DIR -name "$PATTERN" > $TMPFILE
while true; do
$INOTIFY
nosetests $@
sleep 0.5
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment