3 ms·
That really caught my eye! Does anyone have any experience with workflows like this? Are tests next to code a pragmatic technique?
by GhotiFish 13y ago
That really caught my eye!
Does anyone have any experience with workflows like this? Are tests next to code a pragmatic technique?
- qiemem 13y agoPython 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 http://docs.python.org/2/library/doctest.html
- swift 13y agoHaskell also has a library for doctests, though I don't see them used that frequently: https://github.com/sol/doctest-haskell#readme https://github.com/sol/doctest-haskell#readme
- keppy 13y agoI use this in clojure where I am interacting with the code from the repl. run-tests will execute tests for function defns wrapped with the with-test macro. This is fast and no external file or namespace needs to load just type run-tests; http://richhickey.github.io/clojure/clojure.test-api.html http://richhickey.github.io/clojure/clojure.test-api.html