run tests with package pytest-cov by command run coverage run --rcfile=.coveragerc -m pytest.
generate coverage with package pytest-cov by command run coverage report --show-missing.
watch tests with package pytest-watch by command run ptw --quiet --spool 200 --clear --nobeep --config pytest.ini --ext=.py --onfail="echo Tests failed, fix the issues" -v
I would like to have a way to watch coverage while testing as well. May you enlight me?
Describe the solution you'd like
I wrote following bash script ith desired solution:
#!/bin/bash
clear
while true; do
coverage run --rcfile=.coveragerc -m pytest
coverage report --show-missing
sleep 5 # Adjust delay between test runs if needed
clear
done
What's the problem this feature will solve?
I can:
pytest-cov
by command runcoverage run --rcfile=.coveragerc -m pytest
.pytest-cov
by command runcoverage report --show-missing
.pytest-watch
by command runptw --quiet --spool 200 --clear --nobeep --config pytest.ini --ext=.py --onfail="echo Tests failed, fix the issues" -v
I would like to have a way to watch coverage while testing as well. May you enlight me?
Describe the solution you'd like
I wrote following bash script ith desired solution:
Alternative Solutions
I have not found the proper way to proceed.