diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
commit | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch) | |
tree | 64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/python/prompt-toolkit/py3/tests/test_widgets.py | |
parent | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff) | |
download | ydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/python/prompt-toolkit/py3/tests/test_widgets.py')
-rw-r--r-- | contrib/python/prompt-toolkit/py3/tests/test_widgets.py | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/contrib/python/prompt-toolkit/py3/tests/test_widgets.py b/contrib/python/prompt-toolkit/py3/tests/test_widgets.py index 42dd5665479..bf89a2581e3 100644 --- a/contrib/python/prompt-toolkit/py3/tests/test_widgets.py +++ b/contrib/python/prompt-toolkit/py3/tests/test_widgets.py @@ -1,18 +1,18 @@ -from prompt_toolkit.formatted_text import fragment_list_to_text -from prompt_toolkit.layout import to_window -from prompt_toolkit.widgets import Button - - -def _to_text(button: Button) -> str: - control = to_window(button).content - return fragment_list_to_text(control.text()) - - -def test_defaulf_button(): - button = Button("Exit") - assert _to_text(button) == "< Exit >" - - -def test_custom_button(): - button = Button("Exit", left_symbol="[", right_symbol="]") - assert _to_text(button) == "[ Exit ]" +from prompt_toolkit.formatted_text import fragment_list_to_text +from prompt_toolkit.layout import to_window +from prompt_toolkit.widgets import Button + + +def _to_text(button: Button) -> str: + control = to_window(button).content + return fragment_list_to_text(control.text()) + + +def test_defaulf_button(): + button = Button("Exit") + assert _to_text(button) == "< Exit >" + + +def test_custom_button(): + button = Button("Exit", left_symbol="[", right_symbol="]") + assert _to_text(button) == "[ Exit ]" |