Skip to content

Commit 867e329

Browse files
yashhzdamilcarlucas
authored andcommitted
test(progress): tighten regression assertion to assert_called_once
Address review feedback on PR #1554: update_idletasks() is called exactly once per update_progress_bar() invocation, so the regression test should assert exactly that. Matches the assertion style used elsewhere in this test module and prevents a future change from silently calling update_idletasks() multiple times per update. Signed-off-by: Yash Goel <yashvardhan664@gmail.com>
1 parent f1ad680 commit 867e329

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/test_frontend_tkinter_progress_window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def test_progress_updates_do_not_pump_user_events(self, progress_window) -> None
278278
progress_window.update_progress_bar(25, 100)
279279

280280
progress_window.progress_bar.update.assert_not_called()
281-
progress_window.progress_bar.update_idletasks.assert_called()
281+
progress_window.progress_bar.update_idletasks.assert_called_once()
282282

283283
def test_user_sees_progress_window_handle_lazy_window_relift(self, progress_window) -> None:
284284
"""

0 commit comments

Comments
 (0)