Skip to content Skip to sidebar Skip to footer
Showing posts with the label Doctest

Can Autodoc Be Used To Execute Code From Docstring?

When using Sphinx and autodoc to document a Python project, you can use :Example: to include a code… Read more Can Autodoc Be Used To Execute Code From Docstring?

Python Doctest: Skip A Test Conditionally

I know how to skip a doctest using # doctest: +SKIP, but I can't figure out how to skip a test … Read more Python Doctest: Skip A Test Conditionally

Wrapping Python Doctest Results That Are Longer Than 80 Characters

I'm trying to keep my source code under the 80 character guideline width that PEP8 recommends, … Read more Wrapping Python Doctest Results That Are Longer Than 80 Characters

Python Doctest Failed For Equal "expected" And "got"

I try to use doctest for my scenario: def cycle(*its): '''Return the cyclic iterato… Read more Python Doctest Failed For Equal "expected" And "got"

Doctests That Contain String Literals

I have a unit test that I'd like to write for a function that takes XML as a string. It's … Read more Doctests That Contain String Literals