--result-log
is deprecated. You can instead use -v
to output the test case names as they run. If you pipe that into a file, you can query it. So if you're running your tests from a script you can do something like:
pytest -v | tee log.txt
grep -E '::.*(FAILURE|ERROR)' log.txt