3 ms·
> 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 comm
by BiteCode_dev 5y ago
> 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.
- olzhasar 5y agoI 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.