Add --only-rerun flag to add option to rerun specific errors#113
Add --only-rerun flag to add option to rerun specific errors#113gnikonorov merged 7 commits intopytest-dev:masterfrom
Conversation
|
I updated this PR according to your feedback @icemac |
icemac
left a comment
There was a problem hiding this comment.
Still LGTM.
Additionally mentioning this new feature in the readme and changeling would be nice.
Feel free to merge. Do you need a release containing this fix?
|
Thank you. I'll merge this, and open a a PR for the README and changelog. There's no rush for a release, thank you for asking. |
|
Added the README and changelog changes here, since it doesn't make sense to do otherwise. Thanks for reminding me @icemac. Please let me know if you're still comfortable with me merging these changes |
icemac
left a comment
There was a problem hiding this comment.
I am impressed. Thank you for the good documentation.
sallner
left a comment
There was a problem hiding this comment.
I like the PR very much, thank you for your work!
|
|
||
|
|
||
| def _should_hard_fail_on_error(session_config, report): | ||
| if report.outcome != 'failed': |
There was a problem hiding this comment.
It seems to me, that this test is also done in line 230 with report.failed or am I missing some edge case here? Which test case would fail, if we leave it out?
There was a problem hiding this comment.
This is unrelated since it says that anything that is not failed cannot be a hard failure. Which makes sense to me, since otherwise this function would potentially flag non failed things as hard failures
There was a problem hiding this comment.
I understand the reason but I do not see, why we need it twice currently. It seems to be a guard for a case, that is not possible at the moment. But I would like to refactor line 230 anyhow, as this is not so easy to comprehend any more.
There was a problem hiding this comment.
I’m working on this issue and in the change I have a refactor of that line.
This change came out of it. It’s just unrelated, so I raised it first.
|
@gnikonorov When I run it like this (PreSubmitError is my user-defined exception): I get and error: pytest: error: unrecognised arguments: --only-rerun pathToTest |
|
@S-Borkowski Do you actually install pytest-rerunfailures from git master? |
|
@The-Compiler Downloaded version 9.0 (most recent) from pypi. I am unable to install packages through console; i need .whl file to install |
|
@S-Borkowski 9.0 was released on March 18th, this PR was merged on July 17th. You'll need to either find a way to install from the git repository, or wait until the next release. |
|
@The-Compiler When will approx. be the next release? Is there any way You could provide me with .whl of July's version? |
|
@S-Borkowski Here's the result of running No idea when a new release is planned - that's up to the maintainers to decide. |
|
@S-Borkowski @The-Compiler I had setup a milestone with some Tickets to be solved before a 9.1 release. In case you definitely need it quickly, I could cut a release tomorrow and move the remaining issues to a 9.2 release. |
|
@sallner If it won't mess with Your work flow much, I would love that! |
|
@sallner Please let me know what was your decision, and when i can expect 9.1 release :) |
|
@S-Borkowski @The-Compiler I have just released version 9.1 of this package. Feel free to use it. https://pypi.org/project/pytest-rerunfailures/9.1/ |
|
@sallner <3 |
Add new flag
--only-rerunto allow for users to only rerun errors matching regexes passed to this flag. If the flag is omitted or passed in without a value then no changes occur and all failures are rerun.Closes #101