Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tests/test_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -1352,6 +1352,10 @@ def update_body(chapter):
Output('button-output', 'children'),
[Input('button', 'n_clicks')])
def this_callback_takes_forever(n_clicks):
if not n_clicks:
# initial value is quick, only new value is slow
# also don't let the initial value increment call_counts
return 'Initial Value'
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand how this test was passing on master - it failed for me locally, and failed in this branch on ci, until this fix.

time.sleep(5)
call_counts['button-output'].value += 1
return 'New value!'
Expand Down Expand Up @@ -1414,6 +1418,7 @@ def chapter2_assertions():
'input[type="radio"]'
)[1]).click()
chapter2_assertions()
self.assertEqual(call_counts['button-output'].value, 0)
time.sleep(5)
wait_for(lambda: call_counts['button-output'].value == 1)
time.sleep(2) # liberally wait for the front-end to process request
Expand Down