コード例 #1
0
    def test_interrupt_diff(self):
        file_dir = os.path.join(os.path.dirname(__file__), 'data', 'interrupts')
        before_file = os.path.join(file_dir, 'before')
        after_file = os.path.join(file_dir, 'after')
        expected_result_file = os.path.join(file_dir, 'result')
        output_file = tempfile.mktemp()

        _diff_interrupt_files(before_file, after_file, output_file)
        with open(output_file) as fh:
            output_diff = fh.read()
        with open(expected_result_file) as fh:
            expected_diff = fh.read()
        assert_equal(output_diff, expected_diff)
コード例 #2
0
    def test_interrupt_diff(self):
        file_dir = os.path.join(os.path.dirname(__file__), 'data',
                                'interrupts')
        before_file = os.path.join(file_dir, 'before')
        after_file = os.path.join(file_dir, 'after')
        expected_result_file = os.path.join(file_dir, 'result')
        output_file = tempfile.mktemp()

        _diff_interrupt_files(before_file, after_file, output_file)
        with open(output_file) as fh:
            output_diff = fh.read()
        with open(expected_result_file) as fh:
            expected_diff = fh.read()
        assert_equal(output_diff, expected_diff)