def main(): parser = create_parser() parsed_args = parser.parse_args(sys.argv[1:]) if parsed_args.debug: logger.setLevel(logging.DEBUG) set_locale() difference = debbindiff.comparators.compare_files( parsed_args.file1, parsed_args.file2) if difference: if parsed_args.html_output: with make_printer(parsed_args.html_output) as print_func: output_html(difference, css_url=parsed_args.css_url, print_func=print_func, max_page_size=parsed_args.max_report_size) if (parsed_args.text_output and parsed_args.text_output != parsed_args.html_output) or not parsed_args.html_output: with make_printer(parsed_args.text_output or '-') as print_func: output_text(difference, print_func=print_func) return 1 return 0
def main(): parser = create_parser() parsed_args = parser.parse_args(sys.argv[1:]) if parsed_args.debug: logger.setLevel(logging.DEBUG) set_locale() differences = debbindiff.comparators.compare_files(parsed_args.file1, parsed_args.file2) if len(differences) > 0: if parsed_args.html_output: with make_printer(parsed_args.html_output) as print_func: output_html(differences, css_url=parsed_args.css_url, print_func=print_func, max_page_size=parsed_args.max_report_size) if parsed_args.text_output: with make_printer(parsed_args.text_output) as print_func: output_text(differences, print_func=print_func) return 1 return 0
def differences(copydeb): changes1_path, changes2_path = copydeb difference = compare_dot_changes_files(changes1_path, changes2_path) output_text(difference, print_func=print) return difference.details
def test_stat(differences): output_text(differences[0], print_func=print) assert "stat" in differences[0].details[0].details[0].source1