planet-client-python
planet-client-python copied to clipboard
add doctest for python code in documentation
We are using markdown for documentation in v2. The documentation contains many code examples that should be tested for correctness. Add doctest for python code in the markdown documentation.
An option to consider: https://pypi.org/project/phmdoctest/
Looking around, the best option may just be to use python's doctest to doctest interactive code examples with pytest integration. Long examples should be moved to examples/ and referenced via a link from the documentation.
example:
def fcn():
'''Comment
```pycon
>>> fcn()
ResultsFromFcn
```<endofpycon>