-
Notifications
You must be signed in to change notification settings - Fork 9
Add option --forever to keep running tests in a never-ending loop
#124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option --forever to keep running tests in a never-ending loop
#124
Conversation
Closes Quansight-Labs#122. This way people can run a test suite until a test crashes or they manually Ctrl-C out of it. This is especially helpful for thread safety bugs, that might trigger rarely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we actually need this in version control? It adds a lot of noise and I don't think it's used outside of your clone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's generally good practice to have lock files in version control, that's why I added it in the first place, expecting more people to be using uv. The only upside of having it in version control right now is that future contributors running uv will get a consistent environment, which doesn't seem too much of an advantage to me. Let's remove it and re-visit in the future?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove it and re-visit in the future?
Sure, I guess in a followup? Let me try to poke around a little bit to see if I can customize the test output and either reset or not display the progress indicator...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I guess in a followup?
Yeah, let's do it in a follow-up.
Let me try to poke around a little bit to see if I can customize the test output and either reset or not display the progress indicator...
FWIW I had a look and it looks like that's not customizable and one can't even hook into internal things to change the progress displayed.
|
I just realized - this needs a mention in the README. You can also warn that the progress indicator will be broken if you pass |
ngoldbaum
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now. @kumaraditya303 would you mind confirming that this satisfies your need?
Co-authored-by: Nathan Goldbaum <[email protected]>
yes, it works for me. It would be nice to print the iteration count after each run though otherwise it is hard to know how many successful have runs completed. |
|
@kumaraditya303 can you test one more time and let us know if that's what you were looking for? |
Yes, it works as I needed. |
Closes #122.
This way people can run a test suite until a test crashes or they manually Ctrl-C out of it. This is especially helpful for thread safety bugs, that might trigger rarely.
A few comments:
pytest_runtestloop, but I don't think there's any other way.--foreverinto account. It just shows 100% after the first cycle.