Hacker News new | ask | show | jobs
by qiemem 4599 days ago
Python has them in the form of doctests. They are generally frowned upon as they tend to significantly clutter up code and documentation when they actually provide comprehensive testing. That said, Pyret's format may escape that fate as they are given their own section which most modern editors should be capable of folding.

Doctests: http://docs.python.org/2/library/doctest.html

1 comments

Haskell also has a library for doctests, though I don't see them used that frequently:

https://github.com/sol/doctest-haskell#readme