コード例 #1
0
ファイル: test_parsers.py プロジェクト: colossalbit/cssypy
 def test_no_semicolon(self):
     src = u'@charset "utf-8"  '
     parser = Parser(src)
     self.assertTrue(parser.match(tokens.START))
     with self.assertRaises(errors.CSSSyntaxError):
         parser.charset()
     
     src = u'@charset "utf-8"'
     parser = Parser(src)
     self.assertTrue(parser.match(tokens.START))
     with self.assertRaises(errors.CSSSyntaxError):
         parser.charset()
コード例 #2
0
ファイル: test_parsers.py プロジェクト: colossalbit/cssypy
 def test_no_string(self):
     src = u'@charset  ;'
     parser = Parser(src)
     self.assertTrue(parser.match(tokens.START))
     with self.assertRaises(errors.CSSSyntaxError):
         parser.charset()