Esempio n. 1
0
    def nodes_for_test(self, name, item):
        """
            Determine nodes for a single test function
            @param name: name of the function
            @param item: The function itself
        """
        container = nodes.container(classes=["has_info", "nose_test"])

        para = nodes.paragraph()
        para.extend(self.nodes_for_arrow())

        name = testName(item)
        para += nodes.Text(name)

        container.append(para)
        container.append(self.include_source(item))

        return [container]
Esempio n. 2
0
    def nodes_for_test(self, name, item):
        """
            Determine nodes for a single test function
            @param name: name of the function
            @param item: The function itself
        """
        container = nodes.container(classes=["has_info", "nose_test"])

        para = nodes.paragraph()
        para.extend(self.nodes_for_arrow())

        name = testName(item)
        para += nodes.Text(name)

        container.append(para)
        container.append(self.include_source(item))

        return [container]
Esempio n. 3
0
    def nodes_for_class(self, name, item, children):
        """
            Determine nodes for a class
            @param name: name of the class
            @param item: The class itself
            @param children: A list of (name, item, children) for all logicallynested classes
        """
        container = nodes.container(classes=["nose_kls"])
        para = nodes.paragraph(classes=["kls_title"])
        name = testName(item)
        para += nodes.Text(name)
        container.append(para)
        subnodes = self.nodes_for_module(item)
        if not subnodes and not children:
            # Probably not a test class
            return []

        container.extend(subnodes)
        for child in children:
            container.extend(self.nodes_for_class(*child))

        return [container]
Esempio n. 4
0
    def nodes_for_class(self, name, item, children):
        """
            Determine nodes for a class
            @param name: name of the class
            @param item: The class itself
            @param children: A list of (name, item, children) for all logicallynested classes
        """
        container = nodes.container(classes=["nose_kls"])
        para = nodes.paragraph(classes=["kls_title"])
        name = testName(item)
        para += nodes.Text(name)
        container.append(para)
        subnodes = self.nodes_for_module(item)
        if not subnodes and not children:
            # Probably not a test class
            return []

        container.extend(subnodes)
        for child in children:
            container.extend(self.nodes_for_class(*child))

        return [container]