From 3bb7a99a0a596f4eb46780516e184bb0f1876d11 Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Tue, 13 Dec 2022 10:25:43 +0000 Subject: [PATCH] Rework the basic Screen binding test Rather than test that it has zero bindings (although that is a legitimate test too), test for the thing we're really concerned about here: that it doesn't have movement keys. That's what this is all about. --- tests/test_binding_inheritance.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_binding_inheritance.py b/tests/test_binding_inheritance.py index 5e023e8f3..ad03a4227 100644 --- a/tests/test_binding_inheritance.py +++ b/tests/test_binding_inheritance.py @@ -51,10 +51,10 @@ class AppWithScreenNoBindings(App[None]): @pytest.mark.xfail( reason="Screen is incorrectly starting with bindings for movement keys [issue#1343]" ) -async def test_app_screen_no_bindings() -> None: - """An screen with no bindings should have no bindings.""" +async def test_app_screen_has_no_movement_bindings() -> None: + """A screen with no bindings should not have movement key bindings.""" async with AppWithScreenNoBindings().run_test() as pilot: - assert list(pilot.app.screen._bindings.keys.keys()) == [] + assert list(pilot.app.screen._bindings.keys.keys()) != MOVEMENT_KEYS ##############################################################################