From fe01ada7333c6a044914b0a80a4637d5564bc1fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mose=20M=C3=BCller?= Date: Tue, 16 Apr 2024 11:29:44 +0200 Subject: [PATCH] adds tab completion test for client --- tests/client/test_client.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/client/test_client.py b/tests/client/test_client.py index 465ef51..f30a6a5 100644 --- a/tests/client/test_client.py +++ b/tests/client/test_client.py @@ -102,3 +102,17 @@ def test_list(pydase_client: pydase.Client) -> None: pydase_client.proxy.list_attr.clear() assert pydase_client.proxy.list_attr == [] + + +def test_tab_completion(pydase_client: pydase.Client) -> None: + # Tab completion gets its suggestions from the __dir__ class method + assert all( + x in pydase_client.proxy.__dir__() + for x in [ + "list_attr", + "my_method", + "my_property", + "name", + "sub_service", + ] + )