Is there something like 'autotest' for Python unittests?

后端 未结 11 1431
有刺的猬
有刺的猬 2020-12-23 11:28

Basically, growl notifications (or other callbacks) when tests break or pass. Does anything like this exist?

If not, it should be pretty easy to wri

11条回答
  •  再見小時候
    2020-12-23 12:13

    One very useful tool that can make your life easier is entr. Written in C, and uses kqueue or inotify under the hood.

    Following command runs your test suite if any *.py file in your project is changed.

    ls */**.py | entr python -m unittest discover -s test
    

    Works for BSD, Mac OS, and Linux. You can get entr from Homebrew.

提交回复
热议问题