From 938cd3bd1d8256dac1e966457fb685e3ebf7099c Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Thu, 15 Dec 2022 13:17:16 +0000 Subject: [PATCH] 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. --- tests/test_binding_inheritance.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/test_binding_inheritance.py b/tests/test_binding_inheritance.py index 8417ee033..25d11f1a9 100644 --- a/tests/test_binding_inheritance.py +++ b/tests/test_binding_inheritance.py @@ -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",