mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Namespace the recording actions
Wondering if this is the issue with why the tests have stopped working in GitHub; but also not *really* confused as to why they were working in the first place.
This commit is contained in:
@@ -545,13 +545,13 @@ class PriorityOverlapWidget(Static, can_focus=True):
|
||||
"""A focusable widget with a priority binding."""
|
||||
|
||||
BINDINGS = [
|
||||
Binding("0", "record('widget_0')", "0", priority=False),
|
||||
Binding("a", "record('widget_a')", "a", priority=False),
|
||||
Binding("b", "record('widget_b')", "b", priority=False),
|
||||
Binding("c", "record('widget_c')", "c", priority=True),
|
||||
Binding("d", "record('widget_d')", "d", priority=False),
|
||||
Binding("e", "record('widget_e')", "e", priority=True),
|
||||
Binding("f", "record('widget_f')", "f", priority=True),
|
||||
Binding("0", "app.record('widget_0')", "0", priority=False),
|
||||
Binding("a", "app.record('widget_a')", "a", priority=False),
|
||||
Binding("b", "app.record('widget_b')", "b", priority=False),
|
||||
Binding("c", "app.record('widget_c')", "c", priority=True),
|
||||
Binding("d", "app.record('widget_d')", "d", priority=False),
|
||||
Binding("e", "app.record('widget_e')", "e", priority=True),
|
||||
Binding("f", "app.record('widget_f')", "f", priority=True),
|
||||
]
|
||||
|
||||
|
||||
@@ -559,13 +559,13 @@ class PriorityOverlapScreen(Screen):
|
||||
"""A screen with a priority binding."""
|
||||
|
||||
BINDINGS = [
|
||||
Binding("0", "record('screen_0')", "0", priority=False),
|
||||
Binding("a", "record('screen_a')", "a", priority=False),
|
||||
Binding("b", "record('screen_b')", "b", priority=True),
|
||||
Binding("c", "record('screen_c')", "c", priority=False),
|
||||
Binding("d", "record('screen_d')", "c", priority=True),
|
||||
Binding("e", "record('screen_e')", "e", priority=False),
|
||||
Binding("f", "record('screen_f')", "f", priority=True),
|
||||
Binding("0", "app.record('screen_0')", "0", priority=False),
|
||||
Binding("a", "app.record('screen_a')", "a", priority=False),
|
||||
Binding("b", "app.record('screen_b')", "b", priority=True),
|
||||
Binding("c", "app.record('screen_c')", "c", priority=False),
|
||||
Binding("d", "app.record('screen_d')", "c", priority=True),
|
||||
Binding("e", "app.record('screen_e')", "e", priority=False),
|
||||
Binding("f", "app.record('screen_f')", "f", priority=True),
|
||||
]
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
@@ -598,7 +598,7 @@ async def test_overlapping_priority_bindings() -> None:
|
||||
"""Test an app stack with overlapping bindings."""
|
||||
async with PriorityOverlapApp().run_test() as pilot:
|
||||
await pilot.press(*"0abcdef")
|
||||
await pilot.pause(5 / 100)
|
||||
await pilot.pause(2 / 100)
|
||||
assert pilot.app.pressed_keys == [
|
||||
"widget_0",
|
||||
"app_a",
|
||||
|
||||
Reference in New Issue
Block a user