Skip to content

Bug/Fature: Doctest support #168

Open
@jspaezp

Description

@jspaezp

Hi again ...

So I wanted to pitch improving the example/doctest (https://docs.python.org/3/library/doctest.html) support
in the library.

Right now the behavior is pretty ... not great.

This ....

def my_function(lst):
    """
    >>> my_function([1,  1,
    ...     1,2,3,3,4, 5])
    "processed [1,1,1,2,3,3,4,5]"
    """

    return "processed " + str(lst)

Becomes ....

def my_function(lst):
    """
    >>> my_function([1,  1,.

    ...     1,2,3,3,4, 5])
    "processed [1,1,1,2,3,3,4,5]"
    """

    return "processed " + str(lst)

I am proposing ...

Ideal output for reference:

def my_function(lst):
    """
    >>> my_function([1,1,1,2,3,3,4,5])
    "processed [1,1,1,2,3,3,4,5]"
    """

    return "processed " + str(lst)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions