运行pytest-rerunfailures时,我想查看有关失败/重新运行测试的断言信息。有没有办法看这些断言?
例如,我有test_abc
和@pytest.mark.flaky(reruns=2, reruns_delay=2)
。这就是我所看到的:
python -m pytest -s -v -m "abc"
tests/discovery/test_a::test_abc
RERUN (<-- would like to see what failed / asserted)
tests/discovery/test_a::test_abc
PASSED
==================================================================================================== rerun test summary info =====================================================================================================
RERUN
tests/discovery/test_a::test_abc
====================================================================================================== 315 tests deselected ======================================================================================================
======================================================================================= 1 passed, 315 deselected, 1 rerun in 27.25 seconds =======================================================================================
我还在pytest参数中尝试过-vv
。
如果pytest-rerunfailures
不这样做,还有其他解决方案吗?