mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
docs and expanded keys
This commit is contained in:
@@ -57,7 +57,7 @@ async def test_just_app_no_bindings() -> None:
|
||||
class AlphaBinding(App[None]):
|
||||
"""An app with a simple alpha key binding."""
|
||||
|
||||
BINDINGS = [Binding("a", "a", "a")]
|
||||
BINDINGS = [Binding("a", "a", "a", priority=True)]
|
||||
|
||||
|
||||
async def test_just_app_alpha_binding() -> None:
|
||||
@@ -81,8 +81,7 @@ async def test_just_app_alpha_binding() -> None:
|
||||
class LowAlphaBinding(App[None]):
|
||||
"""An app with a simple low-priority alpha key binding."""
|
||||
|
||||
PRIORITY_BINDINGS = False
|
||||
BINDINGS = [Binding("a", "a", "a")]
|
||||
BINDINGS = [Binding("a", "a", "a", priority=False)]
|
||||
|
||||
|
||||
async def test_just_app_low_priority_alpha_binding() -> None:
|
||||
@@ -106,7 +105,7 @@ async def test_just_app_low_priority_alpha_binding() -> None:
|
||||
class ScreenWithBindings(Screen):
|
||||
"""A screen with a simple alpha key binding."""
|
||||
|
||||
BINDINGS = [Binding("a", "a", "a")]
|
||||
BINDINGS = [Binding("a", "a", "a", priority=True)]
|
||||
|
||||
|
||||
class AppWithScreenThatHasABinding(App[None]):
|
||||
@@ -144,8 +143,7 @@ async def test_app_screen_with_bindings() -> None:
|
||||
class ScreenWithLowBindings(Screen):
|
||||
"""A screen with a simple low-priority alpha key binding."""
|
||||
|
||||
PRIORITY_BINDINGS = False
|
||||
BINDINGS = [Binding("a", "a", "a")]
|
||||
BINDINGS = [Binding("a", "a", "a", priority=False)]
|
||||
|
||||
|
||||
class AppWithScreenThatHasALowBinding(App[None]):
|
||||
|
||||
@@ -106,7 +106,7 @@ def test_cant_match_escape_sequence_too_long(parser):
|
||||
# The rest of the characters correspond to the expected key presses
|
||||
events = events[1:]
|
||||
for index, character in enumerate(sequence[1:]):
|
||||
assert events[index].char == character
|
||||
assert events[index].character == character
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
||||
Reference in New Issue
Block a user