4 ms·
> Comments are not testable/verifiable Although not strictly comments (rather, docstrings, which have a similar purpose), Python's doctest[1] allows you to wri
by beaumartinez 13y ago
> Comments are not testable/verifiable
Although not strictly comments (rather, docstrings, which have a similar purpose), Python's doctest[1] allows you to write code in your docstrings and then test them for correctness.
[1] http://docs.python.org/2/library/doctest.html http://docs.python.org/2/library/doctest.html
- pauloortins 13y agoIt works only in python, I think. At time, where is the best practice when testing in python ? Doctests or unittest ?