add typehints, tests

This commit is contained in:
darksidecat 2022-06-26 13:57:17 +03:00
parent 7c18036af0
commit 36fb7761c3
2 changed files with 14 additions and 4 deletions

View file

@ -58,3 +58,14 @@ class TestStateFilter:
state = State()
assert SG.state == copy(SG.state)
assert SG.state == "SG:state"
assert "SG:state" == SG.state
assert State() == State()
with pytest.raises(ValueError):
assert SG.state == 1
states = {SG.state: "OK"}
assert states.get(copy(SG.state)) == "OK"