Beispiel #1
0
 def test_string2(self):
     css = "font-family: \"Garamond\""
     p = SimpleCSSParser(css)
     p.parse()
     d = p.declarations[0]
     self.assertEqual(d[1], "Garamond")
Beispiel #2
0
 def test_property(self):
     css = "font-variant: small-caps"
     p = SimpleCSSParser(css)
     p.parse()
     d = p.declarations[0]
     self.assertEqual(d[0], "font-variant")
Beispiel #3
0
 def test_semicolon(self):
     css = "font-variant: small-caps;"
     p = SimpleCSSParser(css)
     p.parse()
     d = p.declarations[0]
     self.assertEqual(d[1], "small-caps")
Beispiel #4
0
 def test_suite(self):
     css = "font-variant: small-caps;\nfont-weight: bold"
     p = SimpleCSSParser(css)
     p.parse()
     d = p.declarations[1]
     self.assertEqual(len(d), 2)