ITADN

`test_autocomplete[_with_types]` fail with `textual` 6.5.0

#312OpenGaetanLepage 创建于 2025-11-02
G
GaetanLepagecommented
When using the latest textual release ([6.5.0](https://github.com/Textualize/textual/releases/tag/v6.5.0)), the following two tests started failing: ``` =========================== short test summary info ============================ FAILED tests/functional_tests/test_autocomplete.py::test_autocomplete - AssertionError: assert None == 'word' FAILED tests/functional_tests/test_autocomplete.py::test_autocomplete_with_types - AssertionError: assert None == 'word' ======================== 2 failed, 103 passed in 46.64s ======================== ``` Logs: ``` ______________________________ test_autocomplete _______________________________ app = TextEditorApp(title='TextEditorApp', classes={'-dark-mode'}, pseudo_classes={'dark', 'focus'}) word_completer = <function word_completer.<locals>._completer at 0x7ffff4dc80e0> @pytest.mark.asyncio async def test_autocomplete( app: App, word_completer: Callable[[str], list[tuple[str, str]]] ) -> None: messages: list[Message] = [] async with app.run_test(message_hook=messages.append) as pilot: ta = app.query_one("#ta", expect_type=TextEditor) ta.word_completer = word_completer ta.focus() while ta.word_completer is None: await pilot.pause() start_time = monotonic() await pilot.press("s") while ta.completion_list.is_open is False: if monotonic() - start_time > 10: print("MESSAGES:") print("\n".join([str(m) for m in messages])) break await pilot.pause() assert ta.text_input > assert ta.text_input.completer_active == "word" E AssertionError: assert None == 'word' E + where None = TextAreaPlus().completer_active E + where TextAreaPlus() = TextEditor(id='ta').text_input tests/functional_tests/test_autocomplete.py:84: AssertionError ``` Context: [updating `textual` in nixpkgs](https://github.com/NixOS/nixpkgs/pull/457519).
0 条评论