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)
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)
def test_double_comment(self): self.html = """<!-- comment -->""" output = pynliner.fromString(self.html) self.assertNotIn("<!--<!--", output)
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)
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)
def test_double_comment(self): self.html = """<!-- comment -->""" output = pynliner.fromString(self.html) self.assertFalse("<!--<!--" in output)
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)
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)