Hacker News new | ask | show | jobs
by felixhummel 3348 days ago
Along the same lines - use doctests maybe?

    if __name__ == "__main__":
        import doctest
        doctest.testmod()
https://docs.python.org/3.5/library/doctest.html
2 comments

A great idea. But I'd also like to see an all-in-one-place dog and pony show, constructing it and using it right next to each other.
Agreed. Such code without decent doctests is close to useless. Also - try to get decent code coverage if you can.