Example #1
0
 def test_style_functions(self):
     self.assertEqual(
         sc.compile("<red> foo </red>"),
         sc.red(" foo ")
     )
     self.assertEqual(
         sc.compile("<bg_red> foo </bg_red>"),
         sc.bg_red(" foo ")
     )
     self.assertEqual(
         sc.compile("<bold> foo </bold>"),
         sc.bold(" foo ")
     )
Example #2
0
 def test_function_mixing(self):
     self.assertEqual(
         sc.compile("<red>" + sc.bold(sc.style("underline", " foo ")) + "</red>"),
         sc.compile("<red><b><u> foo </u></b></red>")
     )