-
Notifications
You must be signed in to change notification settings - Fork 110
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
Move _wait_until to a correct place #9962
base: main
Are you sure you want to change the base?
Conversation
CodSpeed Performance ReportMerging #9962 will not alter performanceComparing Summary
|
c79398f
to
05993bd
Compare
def _wait_until(condition, timeout, fail_msg): | ||
start = time.time() | ||
while not condition(): | ||
assert start + timeout > time.time(), fail_msg | ||
time.sleep(0.1) | ||
|
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.
If it is only used one place, do we need it as a separate function?
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.
Maybe. Shall I refactor then?
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.
I think that would be good yes. while not condition()
does not read too well without any typing.
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.
Actually there is another wait_until
function. I will use that one.
Issue
Utility function _wait_until is used only in a single test function, so moving it there.
Approach
🚗
(Screenshot of new behavior in GUI if applicable)
git rebase -i main --exec 'just rapid-tests'
)When applicable