def main(argv): if len(argv) != 2: print_usage() exit(1) json_data = argv[0] order = argv[1] diff = load_json_file(json_data) if order == 'TAG': sort_func = sort_diff_by_tags elif order == 'ALPHABET': sort_func = sort_diff_in_alphabetical_order else: print_usage() exit(1) sorted_diff = sort_func(diff) out = Colorize(sys.stdout) print_diff(sorted_diff, out)
def main(argv): if len(argv) != 2: print_usage() exit(1) json_data = argv[0] order = argv[1] diff = load_json_file(json_data) if order == "TAG": sort_func = sort_diff_by_tags elif order == "ALPHABET": sort_func = sort_diff_in_alphabetical_order else: print_usage() exit(1) sorted_diff = sort_func(diff) out = Colorize(sys.stdout) print_diff(sorted_diff, out)
def setUp(self): old = generate_idl_diff.load_json_file(old_data_path) new = generate_idl_diff.load_json_file(new_data_path) self.diff = generate_idl_diff.interfaces_diff(old, new)