mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-06-03 20:30:40 +02:00
client: adds ctx manager tests
This commit is contained in:
parent
18df9e288a
commit
27a832bbd1
@ -149,3 +149,15 @@ def test_tab_completion(pydase_client: pydase.Client) -> None:
|
||||
"sub_service",
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
def test_context_manager(pydase_client: pydase.Client) -> None:
|
||||
client = pydase.Client(url="ws://localhost:9999")
|
||||
|
||||
assert client.proxy.connected
|
||||
|
||||
with client:
|
||||
client.proxy.my_property = 1337.01
|
||||
assert client.proxy.my_property == 1337.01
|
||||
|
||||
assert not client.proxy.connected
|
||||
|
Loading…
x
Reference in New Issue
Block a user