Beispiel #1
0
    def setUp(self):
        self.selector = parse_selector('''* {
    @constant: 10px;
}''')
Beispiel #2
0
 def test_multi(self):
     '''
     Multiple Declarations should be parsed.
     '''
     self.assertEqual(parse_selector('a, b { }').names, ['a', 'b'])
Beispiel #3
0
 def test_nested(self):
     '''
     Nested Declarations should be parsed.
     '''
     self.assertEqual(parse_selector('a b { }').names, ['a b'])
Beispiel #4
0
 def test_id(self):
     '''
     ID Declarations with a hash at the beginning should be parsed.
     '''
     self.assertEqual(parse_selector('#hash { }').names, ['#hash'])
Beispiel #5
0
 def test_font(self):
     '''
     Font Declarations should be parsed.
     '''
     self.assertEqual(parse_selector('@font-face { }').names, ['@font-face'])
Beispiel #6
0
 def test_element(self):
     '''
     Element Declarations should be parsed.
     '''
     self.assertEqual(parse_selector('element { }').names, ['element'])
Beispiel #7
0
 def test_class(self):
     '''
     Class Declarations with a dot at the beginning should be parsed.
     '''
     self.assertEqual(parse_selector('.class { }').names, ['.class'])
Beispiel #8
0
 def test_all(self):
     '''
     Wildcard Declarations with an asterisks should be parsed.
     '''
     self.assertEqual(parse_selector('* { }').names, ['*'])