Run tests when they are saved

Python’s watchdog module includes watchmedo, a command that watches files or directories. I like to use it to automatically run a test when the test is saved:

$ watchmedo shell-command \
--patterns="*.py" \
--recursive \
--command='echo "${watch_src_path}"; python "${watch_src_path}"' \
 tests/