Skip to content

Instantly share code, notes, and snippets.

@mfurquimdev
Created October 29, 2021 17:27
Show Gist options
  • Select an option

  • Save mfurquimdev/a863f9413c4502947cab24b4ec0aa765 to your computer and use it in GitHub Desktop.

Select an option

Save mfurquimdev/a863f9413c4502947cab24b4ec0aa765 to your computer and use it in GitHub Desktop.
Run all `test_hot_` tests with pytest everytime any file is modified
#!/bin/bash
inotifywait -q -m -e close_write -r */ --exclude ".*.pyc|.coverage" | while read -r path event filename;
do
echo -e "\n\n\033[1;7;37mRunning test because $path$filename was $event\033[0;1;0m"
pipenv run pytest -s -vv -x tests -k 'test_hot_'
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment