First, I think for many users typing:
ptw .
is a lot simpler than typing:
watchmedo shell-command --patterns="\*.py" --ignore-directories --recursive . -c "pytest"
Second, I personally faced problems with suggested approach. I use neovim with ale plugin that automatically formats my code with black every time I save python file. That's two saves instead of one. In that case watchmedo will trigger pytest to run twice, which is usually not the desired behavior. Sometimes you also just save your file multiple times quickly and you want pytest to run only once with latest changes in mind.
In my tool, there is a 0.5 seconds delay (configurable --delay). pytest-watcher will wait this time for other changes before starting pytest.
Regarding running tests for changed code only, there is a pytest-testmon plugin which does exactly that. It can be used together with pytest-watcher. Here is the link:
https://testmon.org/