Re:Should programming languages support unit testing natively?
by derefr on Saturday November 07, 2009 @08:32PM
(#928612)
I've always thought the unit test[s] for any given method in a system should be accessible at runtime as a singleton-method of the method object/closure. It would be a similar idea, in effect, to Lisp docstrings, except with another closure in place of a string.
[ Parent
| on HN ]
Re:Should programming languages support unit testing natively?
by mark_h on Saturday November 07, 2009 @09:37PM
(#928698)
Not quite a singleton method, but python does have tests embedded in doc-strings:
http://docs.python.org/library/doctest.html