removes parse_keyed_attribute

This commit is contained in:
Mose Müller
2024-04-25 17:40:33 +02:00
parent d1c00a2612
commit 66376e2e6c
2 changed files with 2 additions and 79 deletions

View File

@ -8,7 +8,6 @@ from pydase.utils.helpers import (
get_path_from_path_parts,
is_property_attribute,
parse_full_access_path,
parse_keyed_attribute,
)
@ -113,22 +112,6 @@ def test_is_property_attribute(attr_name: str, expected: bool) -> None:
assert is_property_attribute(dummy, attr_name) == expected
@pytest.mark.parametrize(
"attr_name, expected",
[
("attr_name", ("attr_name", None)),
("list_attr[2]", ("list_attr", 2)),
('dict_attr["2"]', ("dict_attr", "2")),
('dict_attr["some_key"]', ("dict_attr", "some_key")),
("dict_attr['some_key']", ("dict_attr", "some_key")),
("dict_attr[2]", ("dict_attr", 2)),
("dict_attr[2.1]", ("dict_attr", 2.1)),
],
)
def test_parse_keyed_attributes(attr_name: str, expected: tuple[str, Any]) -> None:
assert parse_keyed_attribute(attr_name) == expected
def test_get_object_attr_from_path() -> None:
class SubService(pydase.DataService):
name = "SubService"