Skip to content

Commit

Permalink
Tests: Improve error message when download times out while starting
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfstr committed Aug 28, 2024
1 parent 35a422f commit 26c7457
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/crystal/tests/util/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ async def wait_for_download_to_start_and_finish(
await wait_for(
tree_has_children_condition(task_tree),
timeout=4.0, # 2.0s isn't long enough for Windows test runners on GitHub Actions
message=lambda: f'Timed out waiting for download task to appear',
stacklevel_extra=(1 + stacklevel_extra),
screenshot_on_error=not immediate_finish_ok)
except WaitTimedOut:
Expand Down
2 changes: 1 addition & 1 deletion src/crystal/tests/util/wait.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def first_child_of_tree_item_is_not_loading() -> Optional[TreeItem]:


def tree_has_children_condition(
tree: wx.TreeCtrl,
tree: wx.TreeCtrl,
) -> Callable[[], Optional[bool]]:
return not_condition(tree_has_no_children_condition(tree))

Expand Down

0 comments on commit 26c7457

Please sign in to comment.