How to automatically run tests when there’s any change in my project (Django)?

Use entr:

  1. $ brew install entr
  2. $ find . -name '*.py' | entr python ./manage.py test

Or, for extra credit, combine it with ack:

$ ack --python | entr python ./manage.py test

If you want it to even find new files as you add them:

$ until ack -f --python | entr -d python ./manage.py test; do sleep 1; done

Leave a Comment