Exemple #1
0
 def testIndentedConditionalComment(self):
   self.assertEqual(str(body(p(), comment(p(), condition='lt IE 7'))), '<body>\n\t<p></p>\n\t<!--[if lt IE 7]>\n\t<p></p>\n\t<![endif]-->\n</body>')
Exemple #2
0
 def testCommentWithTags(self):
   self.assertEqual(str(body(p(), comment(p()))), '<body>\n\t<p></p>\n\t<!--\n\t<p></p>\n\t-->\n</body>')
Exemple #3
0
 def testIndentedChildren(self):
   self.assertEqual(str(body(p(), p())), '<body>\n\t<p></p>\n\t<p></p>\n</body>')
Exemple #4
0
 def testIndentedConditionalComment(self):
     self.assertEqual(
         str(body(p(), comment(p(), condition='lt IE 7'))),
         '<body>\n\t<p></p>\n\t<!--[if lt IE 7]>\n\t<p></p>\n\t<![endif]-->\n</body>'
     )
Exemple #5
0
 def testCommentWithTags(self):
     self.assertEqual(
         str(body(p(), comment(p()))),
         '<body>\n\t<p></p>\n\t<!--\n\t<p></p>\n\t-->\n</body>')
Exemple #6
0
 def testIndentedChildren(self):
     self.assertEqual(str(body(p(), p())),
                      '<body>\n\t<p></p>\n\t<p></p>\n</body>')