Пример #1
0
 def test_no_css_option(self):
     """Simple test for --no-css option"""
     f1 = self.write_file("foobar")
     f2 = self.write_file("foobarbaz")
     out = io.BytesIO()
     ghdiff.main([f1, f2, "--no-css"], stdout=out)
     output = out.getvalue()
     self.assertFalse(b"<style" in output)
Пример #2
0
 def test_no_css_option(self):
     """Simple test for --no-css option"""
     f1 = self.write_file("foobar")
     f2 = self.write_file("foobarbaz")
     out = io.BytesIO()
     ghdiff.main([f1, f2, "--no-css"], stdout=out)
     output = out.getvalue()
     self.assertFalse(b"<style" in output)
Пример #3
0
 def test_script(self):
     """Simple exercise of the commandline mode"""
     f1 = self.write_file("foobar")
     f2 = self.write_file("foobarbaz")
     out = io.BytesIO()
     ghdiff.main([f1, f2], stdout=out)
     output = out.getvalue()
     self.assertTrue(b"-foobar" in output)
     self.assertTrue(b'+foobar<span class="highlight">baz</span>' in output)
Пример #4
0
 def test_script(self):
     """Simple exercise of the commandline mode"""
     f1 = self.write_file("foobar")
     f2 = self.write_file("foobarbaz")
     out = io.BytesIO()
     ghdiff.main([f1, f2], stdout=out)
     output = out.getvalue()
     self.assertTrue(b"-foobar" in output)
     self.assertTrue(b'+foobar<span class="highlight">baz</span>' in output)