コード例 #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)
コード例 #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)
コード例 #3
0
 def test_double_comment(self):
     self.html = """<!-- comment -->"""
     output = pynliner.fromString(self.html)
     self.assertNotIn("<!--<!--", output)
コード例 #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)
コード例 #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)
コード例 #6
0
 def test_double_comment(self):
     self.html = """<!-- comment -->"""
     output = pynliner.fromString(self.html)
     self.assertFalse("<!--<!--" in output)
コード例 #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)
コード例 #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)