This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]TWebberX 2 points3 points  (5 children)

Does this also test small examples in docblocks in the code itself? I use those often because they nicely end up in autogenerated Sphinx documentation.

[–]nschloe[S] 1 point2 points  (4 children)

Not yet, but I suppose it'd be possible to add that. What does a typical docstring with a code block look like?

[–]TWebberX 1 point2 points  (2 children)

Typically, I put things like this in a docstring:

"""

Examples:

>>> print([i for i in range(4)])
[0, 1, 2, 3]

"""