stouputils.all_doctests package#

This module is used to run all the doctests for all the modules in a given directory.

# Create a package whose docstring holds two tests, the second one wrong
mkdir my_package
cat > my_package/geometry.py <<'EOF'
def area(width: float, height: float) -> float:
        ''' Area of a rectangle.

        >>> area(2, 3)
        6
        >>> area(2.5, 2)
        5
        '''
        return width * height
EOF

# Run every doctest of the package
stouputils all_doctests my_package
Terminal output of the example, one doctest failing

Submodules#