mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-06-12 15:57:12 +02:00
fixes add_prefix_to_full_access_path, updates tests
The prefix does not contain a "." anymore. This will be added by the function itself (to be able to distinguish empty full access paths).
This commit is contained in:
@ -1086,7 +1086,7 @@ def test_generate_serialized_data_paths(obj: Any, expected: list[str]) -> None:
|
||||
}
|
||||
},
|
||||
},
|
||||
"prefix.",
|
||||
"prefix",
|
||||
{
|
||||
"full_access_path": "prefix.new_attr",
|
||||
"value": {
|
||||
@ -1107,7 +1107,7 @@ def test_generate_serialized_data_paths(obj: Any, expected: list[str]) -> None:
|
||||
}
|
||||
],
|
||||
},
|
||||
"prefix.",
|
||||
"prefix",
|
||||
{
|
||||
"full_access_path": "prefix.new_attr",
|
||||
"value": [
|
||||
@ -1128,7 +1128,7 @@ def test_generate_serialized_data_paths(obj: Any, expected: list[str]) -> None:
|
||||
}
|
||||
},
|
||||
},
|
||||
"prefix.",
|
||||
"prefix",
|
||||
{
|
||||
"full_access_path": "prefix.new_attr",
|
||||
"value": {
|
||||
@ -1144,7 +1144,7 @@ def test_generate_serialized_data_paths(obj: Any, expected: list[str]) -> None:
|
||||
"full_access_path": "new_attr",
|
||||
"value": {"magnitude": 10, "unit": "meter"},
|
||||
},
|
||||
"prefix.",
|
||||
"prefix",
|
||||
{
|
||||
"full_access_path": "prefix.new_attr",
|
||||
"value": {"magnitude": 10, "unit": "meter"},
|
||||
@ -1160,7 +1160,7 @@ def test_generate_serialized_data_paths(obj: Any, expected: list[str]) -> None:
|
||||
}
|
||||
],
|
||||
},
|
||||
"prefix.",
|
||||
"prefix",
|
||||
{
|
||||
"full_access_path": "prefix.quantity_list",
|
||||
"value": [
|
||||
@ -1171,6 +1171,53 @@ def test_generate_serialized_data_paths(obj: Any, expected: list[str]) -> None:
|
||||
],
|
||||
},
|
||||
),
|
||||
(
|
||||
{
|
||||
"full_access_path": "",
|
||||
"value": {
|
||||
"dict_attr": {
|
||||
"type": "dict",
|
||||
"full_access_path": "dict_attr",
|
||||
"value": {
|
||||
"foo": {
|
||||
"full_access_path": 'dict_attr["foo"]',
|
||||
"type": "dict",
|
||||
"value": {
|
||||
"some_int": {
|
||||
"full_access_path": 'dict_attr["foo"].some_int',
|
||||
"type": "int",
|
||||
"value": 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
"prefix",
|
||||
{
|
||||
"full_access_path": "prefix",
|
||||
"value": {
|
||||
"dict_attr": {
|
||||
"type": "dict",
|
||||
"full_access_path": "prefix.dict_attr",
|
||||
"value": {
|
||||
"foo": {
|
||||
"full_access_path": 'prefix.dict_attr["foo"]',
|
||||
"type": "dict",
|
||||
"value": {
|
||||
"some_int": {
|
||||
"full_access_path": 'prefix.dict_attr["foo"].some_int',
|
||||
"type": "int",
|
||||
"value": 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_add_prefix_to_full_access_path(
|
||||
|
Reference in New Issue
Block a user