Skip to content

Conversation

@lysnikolaou
Copy link
Member

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:

  • I would like to avoid using pytest_runtestloop, but I don't think there's any other way.
  • Any ideas on how to test this? I manually verified that it works but having automated tests for this is probably a bit more effort.
  • The progress indication does not take --forever into account. It just shows 100% after the first cycle.

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.
Copy link
Collaborator

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.

Copy link
Member Author

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?

Copy link
Collaborator

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...

Copy link
Member Author

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.

@ngoldbaum
Copy link
Collaborator

I just realized - this needs a mention in the README. You can also warn that the progress indicator will be broken if you pass --forever.

Copy link
Collaborator

@ngoldbaum ngoldbaum left a 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]>
@kumaraditya303
Copy link

would you mind confirming that this satisfies your need?

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.

@ngoldbaum
Copy link
Collaborator

@kumaraditya303 can you test one more time and let us know if that's what you were looking for?

@ngoldbaum ngoldbaum mentioned this pull request Sep 16, 2025
@kumaraditya303
Copy link

can you test one more time and let us know if that's what you were looking for?

Yes, it works as I needed.

@lysnikolaou lysnikolaou merged commit 7bf55ec into Quansight-Labs:main Sep 17, 2025
10 checks passed
@lysnikolaou lysnikolaou deleted the add-forever-option branch September 17, 2025 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add --forever mode for stress testing

3 participants