iter states in states group (#666)

* iter states in states group

* fix type hint

* remove empty line

* add changes for doc
This commit is contained in:
Andrey Tikhonov 2021-09-05 23:55:38 +03:00 committed by GitHub
parent 714ac8896c
commit 90b3a99039
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 1 deletions

View file

@ -150,6 +150,13 @@ class TestStatesGroup:
assert MyGroup.MyNestedGroup.get_root() is MyGroup
def test_iterable(self):
class Group(StatesGroup):
x = State()
y = State()
assert set(Group) == {Group.x, Group.y}
def test_empty_filter(self):
class MyGroup(StatesGroup):
pass