Ejemplo n.º 1
0
 def test_underscores_valid_is_false(self):
     invalid_classes = {
         '_bold', 'lighter-1_', 'width-_2', 'margin-2_rem', 'height-m_px', 'bg-color__blue',
         '-_2', '2_rem', 'm_px', '__', '_35', '42_', '-7_2', '5_4-', ' _ ', ' _3_2', '8_9_ ', '6_4 _ ',
     }
     class_parser = ClassPropertyParser(class_set=set())
     for css_class in invalid_classes:
         self.assertFalse(class_parser.underscores_valid(css_class=css_class), msg=css_class)
Ejemplo n.º 2
0
 def test_underscores_valid_is_true(self):
     valid_classes = {'6_3', 'padding-5_2rem', 'height-24_48p', '1_2-5_75-1_2-5_75', 'n5_25cm', }
     class_parser = ClassPropertyParser(class_set=valid_classes)
     for css_class in class_parser.class_set:
         self.assertTrue(class_parser.underscores_valid(css_class=css_class), msg=css_class)