Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> that case watchmedo will trigger pytest to run twice,

That's what the --drop options is for. It's better than delay, since it drops any event while the command is running, no matter the time it took.

> First, I think for many users typing: ... is a lot simpler than typing:...

I think somebody using pytest is perfectly capable of doing:

alias ptw='watchmedo shell-command --patterns="*.py" --ignore-directories --recursive . -c "pytest" --drop'

Or putting that in a makefile, a dodo.py file or what have you.



I don’t think that —drop is better than delay in case of tests. Quite contrary, one usually wants them to run after latest save not the first one.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: