diff --git a/asyncua/binary_address_space.pickle b/asyncua/binary_address_space.pickle index f41cacb20..e956f02fc 100644 Binary files a/asyncua/binary_address_space.pickle and b/asyncua/binary_address_space.pickle differ diff --git a/asyncua/sync.py b/asyncua/sync.py index f19fe1b9f..a95b76252 100644 --- a/asyncua/sync.py +++ b/asyncua/sync.py @@ -660,6 +660,8 @@ def __init__(self, tloop: ThreadLoop, aio_node: node.Node): self.tloop = tloop def __eq__(self, other): + if not isinstance(other, SyncNode): + return False return other is not None and self.aio_obj == other.aio_obj def __ne__(self, other): diff --git a/tests/test_sync.py b/tests/test_sync.py index ad4683277..e450c8c32 100644 --- a/tests/test_sync.py +++ b/tests/test_sync.py @@ -97,11 +97,13 @@ def test_sync_client_get_node(client, idx): node = client.get_node(85) assert node == client.nodes.objects nodes = node.get_children() - assert len(nodes) > 2 - assert nodes[0] == client.nodes.server assert isinstance(nodes[0], SyncNode) + assert len(nodes) > 2 - results = node.get_children_by_path([[f"{idx}:MyObject", f"{idx}:MyVariable"]]) + child = node.get_child(["0:Server"]) + assert child == client.nodes.server + + results = node.get_children_by_patdh([[f"{idx}:MyObject", f"{idx}:MyVariable"]]) assert len(results) == 1 vars = results[0] assert len(vars) == 1 @@ -177,9 +179,11 @@ def test_sync_server_get_node(server, idx): assert node == server.nodes.objects nodes = node.get_children() assert len(nodes) > 2 - assert nodes[0] == server.nodes.server assert isinstance(nodes[0], SyncNode) + child = node.get_child(["0:Server"]) + assert child == server.nodes.server + results = node.get_children_by_path([[f"{idx}:MyObject", f"{idx}:MyVariable"]]) assert len(results) == 1 vars = results[0]