Another kind of bug revealed by including tests in your coverage:
with pytest.raises(ValueError):
process_data("bad data 1")
process_data("bad data 2") # never executed!
https://nedbatchelder.com/blog/202008/you_should_include_your_tests_in_coverage.html
with pytest.raises(ValueError):
process_data("bad data 1")
process_data("bad data 2") # never executed!
https://nedbatchelder.com/blog/202008/you_should_include_your_tests_in_coverage.html
Comments
So essentially, what you're saying but automatic and implicit