pytest-rerunfailures icon indicating copy to clipboard operation
pytest-rerunfailures copied to clipboard

Rerun tests are not reported with "all" setting

Open QuLogic opened this issue 8 years ago • 3 comments

When I run pytest -ra path/to/flaky/tests, I expect rerun tests to be listed, but they aren't. I would this is because 'R' is not something that pytest know about.

This can be worked around using pytest -raR path/to/flaky/tests, but it would be nice if -ra automatically included 'R' tests as well.

QuLogic avatar Mar 19 '17 21:03 QuLogic

@QuLogic Interesting idea. As I never used -ra before I'd like to see a PR for this requested feature.

icemac avatar May 23 '17 18:05 icemac

The fact that the -raR command line option results in a separate rerun test summary info section near the end of the terminal output needs to be documented. I've been looking for this feature specifically, and actually came to these forums because I was going to report the lack of being able to see the rerun tests the summary section, and make a feature request for it. So, great to know it exists! But let's get the word out!

It should also be pointed out that simply specifying -rR does NOT result in the rerun summary section, which is pretty counterintuitive. You have to bundle it with the a option to see the rerun summary section.

jeffwright13 avatar May 18 '22 03:05 jeffwright13

To follow up on my earlier comments: I have since discovered that using pytest option -raR will not show Failed test cases, whereas -rAR shows ALL test cases (including Passed). Either a or A are sufficient for pytest to show the rerun test summary info section on console.

jeffwright13 avatar May 18 '22 18:05 jeffwright13