Installing pytest with pip will return the following error.
1
2
learnGPT-team2 % pytest test_ex.py -s -vv
zsh: command not found: pytest
In this case, try python -m pytest
Installing pytest via pip doesn’t make it a system command, it installs it to python. The -m command runs pytest as its own command and then any proceeding script will be an argument.
1
python3 -m pytest test_ex.py -s -vv