2 ms·
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 wou
by derefr 17y ago
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.
- mark_h 17y agoNot quite a singleton method, but python does have tests embedded in doc-strings: http://docs.python.org/library/doctest.html http://docs.python.org/library/doctest.html