mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add testing for the __bool__ method of a query
This commit is contained in:
@@ -47,6 +47,9 @@ def test_query():
|
||||
assert list(app.query(".frob")) == []
|
||||
assert list(app.query("#frob")) == []
|
||||
|
||||
assert app.query("App")
|
||||
assert not app.query("NotAnApp")
|
||||
|
||||
assert list(app.query("App")) == [app]
|
||||
assert list(app.query("#main")) == [main_view]
|
||||
assert list(app.query("View#main")) == [main_view]
|
||||
|
||||
Reference in New Issue
Block a user