mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Improve the name of one of the tests
Just to make it a bit more clear what's going on and why. There's a fair bit goes into each of these tests and this module is in danger of getting quite messy. I may revisit the layout at some point just to make it all a lot more readable.
This commit is contained in:
@@ -146,7 +146,7 @@ async def test_pressing_movement_keys_app() -> None:
|
|||||||
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
class WidgetWithBindings(Static, can_focus=True):
|
class FocusableWidgetWithBindings(Static, can_focus=True):
|
||||||
"""A widget that has its own bindings for the movement keys."""
|
"""A widget that has its own bindings for the movement keys."""
|
||||||
|
|
||||||
BINDINGS = [
|
BINDINGS = [
|
||||||
@@ -163,10 +163,10 @@ class AppWithWidgetWithBindings(AppKeyRecorder):
|
|||||||
"""A test app that composes with a widget that has movement bindings."""
|
"""A test app that composes with a widget that has movement bindings."""
|
||||||
|
|
||||||
def compose(self) -> ComposeResult:
|
def compose(self) -> ComposeResult:
|
||||||
yield WidgetWithBindings()
|
yield FocusableWidgetWithBindings()
|
||||||
|
|
||||||
def on_mount(self) -> None:
|
def on_mount(self) -> None:
|
||||||
self.query_one(WidgetWithBindings).focus()
|
self.query_one(FocusableWidgetWithBindings).focus()
|
||||||
|
|
||||||
|
|
||||||
async def test_focused_child_widget_with_movement_bindings() -> None:
|
async def test_focused_child_widget_with_movement_bindings() -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user