diff --git a/src/crystal/tests/test_shell.py b/src/crystal/tests/test_shell.py index fa94e6e8..2cc42afb 100644 --- a/src/crystal/tests/test_shell.py +++ b/src/crystal/tests/test_shell.py @@ -803,7 +803,7 @@ def _read_until( if did_time_out: # Look for an acceptable "stop suffix" # Special case: '' is always an acceptable `stop_suffix` - if '' in stop_suffix_bytes_choices: + if '' in stop_suffix: found_stop_suffix = '' else: # Read stream diff --git a/src/crystal/tests/util/tasks.py b/src/crystal/tests/util/tasks.py index d08d1b86..894d0a04 100644 --- a/src/crystal/tests/util/tasks.py +++ b/src/crystal/tests/util/tasks.py @@ -20,6 +20,7 @@ async def wait_for_download_to_start_and_finish( task_tree: wx.TreeCtrl, *, immediate_finish_ok: bool=False, + stacklevel_extra: int=0 ) -> None: # TODO: Allow caller to tune "max_download_duration_per_item" max_download_duration_per_standard_item = ( @@ -38,7 +39,8 @@ async def wait_for_download_to_start_and_finish( try: 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 + timeout=4.0, # 2.0s isn't long enough for Windows test runners on GitHub Actions + stacklevel_extra=(1 + stacklevel_extra)) except WaitTimedOut: if immediate_finish_ok: return