Skip to content

Commit 795d76d

Browse files
committed
Test query truthiness
1 parent 7111d82 commit 795d76d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/test_ecs.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,3 +275,10 @@ def test_entity_clear() -> None:
275275
def test_world_iter() -> None:
276276
with pytest.raises(TypeError, match=r"is not iterable"):
277277
iter(tcod.ecs.Registry()) # Not iterable for now, maybe later
278+
279+
280+
def test_world_query_bool() -> None:
281+
world = tcod.ecs.Registry()
282+
assert not world.Q.all_of(tags=["Foo"])
283+
world[None].tags.add("Foo")
284+
assert world.Q.all_of(tags=["Foo"])

0 commit comments

Comments
 (0)