mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
##############################################################################
|
||||
|
||||
Reference in New Issue
Block a user