Testing demo: pytest run doctests


The nice thing about pytest that it can also run all the doctests in your module. So you can start your testing journey with doctest and later switch to pytest.

You can easily test your examples in your documentation.


$ pytest --doctest-modules mymath.py