Пример #1
0
    def test_diff_single_line(self):
        table = diff_text('', 'added')
        # create_debug_file(table)

        self.assertIsNotNone(table)
        self.assertTrue('<span class="diff_sub"> </span>' in table)
        self.assertTrue('<span class="diff_add">added</span>' in table)
Пример #2
0
    def test_diff_single_line(self):
        table = diff_text('', 'added')
        # create_debug_file(table)

        self.assertIsNotNone(table)
        self.assertTrue('<span class="diff_sub"> </span>' in table)
        self.assertTrue('<span class="diff_add">added</span>' in table)
Пример #3
0
    def test_diff_text(self):
        file1 = read_file(os.path.join(base_path, '1.txt'))
        file2 = read_file(os.path.join(base_path, '2.txt'))

        table = diff_text(file1, file2)
        # create_debug_file(table)

        self.assertIsNotNone(table)
        self.assertTrue('<span class="diff_chg">1</span>' in table)
        self.assertTrue('<span class="diff_chg">2</span>' in table)
        self.assertTrue(
            '<span class="diff_add">Some text here.</span>' in table)
Пример #4
0
    def test_diff_text(self):
        file1 = read_file(os.path.join(base_path, '1.txt'))
        file2 = read_file(os.path.join(base_path, '2.txt'))

        table = diff_text(file1, file2)
        # create_debug_file(table)

        self.assertIsNotNone(table)
        self.assertTrue('<span class="diff_chg">1</span>' in table)
        self.assertTrue('<span class="diff_chg">2</span>' in table)
        self.assertTrue(
            '<span class="diff_add">Some text here.</span>' in table)
Пример #5
0
 def test_diff_text_equal(self):
     table = diff_text('', None)
     self.assertIsNone(table)
Пример #6
0
 def test_diff_text_equal(self):
     table = diff_text('', None)
     self.assertIsNone(table)