Ejemplo n.º 1
0
 def test_07_fromString(self):
     """Test 'fromString' complete"""
     output = pynliner.fromString(self.html)
     desired = u(
         '<span class="b1" style="font-weight: bold">Bold</span><span class="b2 c" style="color: red; font-weight: bold">Bold Red</span>'
     )
     self.assertEqual(output, desired)
Ejemplo n.º 2
0
 def test_07_fromString(self):
     """Test 'fromString' complete"""
     output = pynliner.fromString(self.html)
     desired = u'<h1 style="color: #fc0">Hello World!</h1>'
     self.assertEqual(output, desired)
Ejemplo n.º 3
0
 def test_double_comment(self):
     self.html = """<!-- comment -->"""
     output = pynliner.fromString(self.html)
     self.assertNotIn("<!--<!--", output)
Ejemplo n.º 4
0
    def test_double_doctype(self):
        self.html = """<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">"""
        output = pynliner.fromString(self.html)
        self.assertNotIn("<!<!", output)
Ejemplo n.º 5
0
 def test_07_fromString(self):
     """Test 'fromString' complete"""
     output = pynliner.fromString(self.html)
     desired = u('<h1 style="color: #fc0">Hello World!</h1>')
     self.assertEqual(output, desired)
Ejemplo n.º 6
0
 def test_double_comment(self):
     self.html = """<!-- comment -->"""
     output = pynliner.fromString(self.html)
     self.assertFalse("<!--<!--" in output)
Ejemplo n.º 7
0
    def test_double_doctype(self):
        self.html = """<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">"""
        output = pynliner.fromString(self.html)
        self.assertFalse("<!<!" in output)
Ejemplo n.º 8
0
 def test_07_fromString(self):
     """Test 'fromString' complete"""
     output = pynliner.fromString(self.html)
     desired = u('<span class="b1" style="font-weight: bold">Bold</span><span class="b2 c" style="color: red; font-weight: bold">Bold Red</span>')
     self.assertEqual(output, desired)