def METHOD_NAME(self):
    # "*" can only appear in a terminal position
    invalid_expressions = [
        "*.*",
        "*:*",
        "*.name",
        "*.items",
        "*:name",
        "*.a,b",
        "[a.*,b].c",
    ]
    for expression in invalid_expressions:
        with self.subTest(expression=expression):
            with self.assertRaises(ValueError):
                parse(expression)