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 63993f594..b71cc056a 100644 --- a/asyncua/sync.py +++ b/asyncua/sync.py @@ -667,6 +667,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..c4069d1f1 100644 --- a/tests/test_sync.py +++ b/tests/test_sync.py @@ -97,9 +97,11 @@ 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 + + child = node.get_child(["0:Server"]) + assert child == client.nodes.server results = node.get_children_by_path([[f"{idx}:MyObject", f"{idx}:MyVariable"]]) assert len(results) == 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]