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:

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