Example #1
0
    def test_parse_modifier(self):
        mod = Modifier.parse(".foobar - Test")
        self.assertEqual(mod.klass, ".foobar")
        self.assertEqual(mod.description, "Test")

        mod = Modifier.parse(".foobar-baz - Test-2")
        self.assertEqual(mod.klass, ".foobar-baz")
        self.assertEqual(mod.description, "Test-2")

        mod = Modifier.parse(".foobar-baz   -   Test-3")
        self.assertEqual(mod.klass, ".foobar-baz")
        self.assertEqual(mod.description, "Test-3")
Example #2
0
 def test_parse_pseudo_class_modifier(self):
     mod = Modifier.parse(":hover - Test-4")
     self.assertEqual(mod.klass, ":hover")
     self.assertEqual(mod.description, "Test-4")