Example #1
0
 def test_prepare_emptyline(self):
     html = str(HtmlFormatter().prepare(0, '\0+ \1'))
     self.assertFalse('diff-whitespace' in html)
     self.assertTrue('diff-emptyline' in html)
Example #2
0
 def test_prepare_chg(self):
     html = str(HtmlFormatter(distinguish_changed=True).prepare(0, '\0^ \1'))
     self.assertTrue('diff-chg' in html)
     self.assertTrue('diff-chg-bg' in html)
Example #3
0
 def test_prepare_chg_to(self):
     html = str(HtmlFormatter(distinguish_changed=False).prepare(1, '\0^ \1'))
     self.assertTrue('diff-add' in html)
     self.assertTrue('diff-add-bg' in html)
     self.assertFalse('diff-chg' in html)
     self.assertFalse('diff-chg-bg' in html)
Example #4
0
 def test_prepare_chg_from(self):
     html = str(HtmlFormatter(distinguish_changed=False).prepare(0, '\0^ \1'))
     self.assertTrue('diff-del' in html)
     self.assertTrue('diff-del-bg' in html)
     self.assertFalse('diff-chg' in html)
     self.assertFalse('diff-chg-bg' in html)
Example #5
0
 def test_prepare_del(self):
     html = str(HtmlFormatter().prepare(0, '\0- \1'))
     self.assertTrue('diff-del' in html)
     self.assertTrue('diff-del-bg' in html)
Example #6
0
 def test_prepare_add(self):
     html = str(HtmlFormatter().prepare(0, '\0+ \1'))
     self.assertTrue('diff-add' in html)
     self.assertTrue('diff-add-bg' in html)