restructure StateManager to allow extending dictionaries through clients

This commit is contained in:
Mose Müller
2024-07-29 14:56:57 +02:00
parent d54eed8a58
commit 36d3a7becc
2 changed files with 31 additions and 11 deletions

View File

@ -121,6 +121,9 @@ def test_dict(pydase_client: pydase.Client) -> None:
# pop will remove the dictionary entry on the server
assert list(pydase_client.proxy.dict_attr.keys()) == ["foo"]
pydase_client.proxy.dict_attr["non_existent_key"] = "Hello"
assert pydase_client.proxy.dict_attr["non_existent_key"] == "Hello"
def test_tab_completion(pydase_client: pydase.Client) -> None:
# Tab completion gets its suggestions from the __dir__ class method