(d_1, d_2, reverse)
| 62 | |
| 63 | |
| 64 | def compare_schemas(d_1, d_2, reverse): |
| 65 | errors = [] |
| 66 | domains_1 = copy.deepcopy(d_1) |
| 67 | domains_2 = copy.deepcopy(d_2) |
| 68 | types_1 = normalize_types_in_schema(domains_1) |
| 69 | types_2 = normalize_types_in_schema(domains_2) |
| 70 | |
| 71 | domains_by_name_1 = list_to_map(domains_1, "domain") |
| 72 | domains_by_name_2 = list_to_map(domains_2, "domain") |
| 73 | |
| 74 | for name in domains_by_name_1: |
| 75 | domain_1 = domains_by_name_1[name] |
| 76 | if name not in domains_by_name_2: |
| 77 | errors.append("%s: domain has been %s" % (name, removed(reverse))) |
| 78 | continue |
| 79 | compare_domains(domain_1, domains_by_name_2[name], types_1, types_2, errors, reverse) |
| 80 | return errors |
| 81 | |
| 82 | |
| 83 | def compare_domains(domain_1, domain_2, types_map_1, types_map_2, errors, reverse): |
no test coverage detected