From 4e66c48313cc40d0b17574159c93c2c32d8ee629 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Wed, 3 Nov 2021 11:01:59 +0000 Subject: [PATCH] more query tests --- tests/test_query.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/test_query.py b/tests/test_query.py index d21209520..c6bed7e2c 100644 --- a/tests/test_query.py +++ b/tests/test_query.py @@ -58,5 +58,19 @@ def test_query(): assert list(app.query("App > View")) == [main_view, help_view] assert list(app.query("App > View#help")) == [help_view] + assert list(app.query("App > View#main .float ")) == [sidebar, tooltip] + assert list(app.query("View > View")) == [sub_view] assert list(app.query("#help *")) == [help, helpbar] + assert list(app.query("#main *")) == [ + widget1, + widget2, + sidebar, + sub_view, + tooltip, + ] + + assert list(app.query("App,View")) == [app, main_view, sub_view, help_view] + assert list(app.query("#widget1, #widget2")) == [widget1, widget2] + assert list(app.query("#widget1 , #widget2")) == [widget1, widget2] + assert list(app.query("#widget1, #widget2, App")) == [app, widget1, widget2]