ivoire/transform.py
def transform_describe(self, node, describes, context_variable):
        """
        Transform a describe node into a ``TestCase``.

        ``node`` is the node object.
        ``describes`` is the name of the object being described.
        ``context_variable`` is the name bound in the context manager (usually
        "it").

        """

        body = self.transform_describe_body(node.body, context_variable)
        return ast.ClassDef(
            name="Test" + describes.title(),
            bases=[ast.Name(id="TestCase", ctx=ast.Load())],
            keywords=[],
            starargs=None,
            kwargs=None,
            body=list(body),
            decorator_list=[],
        )
def transform_describe(self, node, describes, context_variable):
        """
        Transform a describe node into a ``TestCase``.

        ``node`` is the node object.
        ``describes`` is the name of the object being described.
        ``context_variable`` is the name bound in the context manager (usually
        "it").

        """

        body = self.transform_describe_body(node.body, context_variable)
        return ast.ClassDef(
            name="Test" + describes.title(),
            bases=[ast.Name(id="TestCase", ctx=ast.Load())],
            keywords=[],
            starargs=None,
            kwargs=None,
            body=list(body),
            decorator_list=[],
        )
Transform a describe node into a ``TestCase``.

        ``node`` is the node object.
        ``describes`` is the name of the object being described.
        ``context_variable`` is the name bound in the context manager (usually
        "it").