def check_map_vs_map(m1: Map, m2: Map): node_ids1 = set(m1.get_all_node_ids()) node_ids2 = set(m2.get_all_node_ids()) common_node_ids = node_ids1.intersection(node_ids2) for node_id in common_node_ids: print(node_id) assert len( common_node_ids ) == 0, f'{m1.get_name()} contains {len(common_node_ids)} common node ids with {m2.get_name()}!'
def check_map_vs_region(m1: Map, r2: Region): node_ids1 = set(m1.get_all_node_ids()) node_ids2 = set(r2.get_node_ids()) common_node_ids = node_ids1.intersection(node_ids2) for node_id in common_node_ids: print(node_id) assert len( common_node_ids ) == 0, f'{m1.get_name()} contains {len(common_node_ids)} common node ids with {r2.map.get_name()}.{r2.get_name()}!'
def check_map(m: Map): node_ids = m.get_all_node_ids() dupes = dupes_in_list(node_ids) for node_id in dupes: print(node_id) assert len(dupes) == 0, f'{m.get_name()} contains duplicate node ids!'