def METHOD_NAME(self) -> None:
    """Test that the checker correctly reports a comprehension in the code when its usage is
    disallowed.
    """
    src = """
    comp = [i ** 2 for i in range(1, 11)]
    """
    mod = astroid.parse(src)
    comprehension_node, *_ = mod.nodes_of_class(nodes.Comprehension)
    name = comprehension_node.__class__.__name__
    with self.assertAddsMessages(
        pylint.testutils.MessageTest(
            msg_id="forbidden-python-syntax", node=comprehension_node, args=name
        ),
        ignore_position=True,
    ):
        self.checker.visit_default(comprehension_node)