Re:Pyret: A new programming language from the creators of Ra...
by qiemem on Saturday November 09, 2013 @12:36PM
(#6702318)
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.
Re:Pyret: A new programming language from the creators of Ra...
by swift on Saturday November 09, 2013 @08:19PM
(#6704587)
Haskell also has a library for doctests, though I don't see them used that frequently:
Re:Pyret: A new programming language from the creators of Ra...
by keppy on Saturday November 09, 2013 @01:25PM
(#6702499)
I 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
Does anyone have any experience with workflows like this? Are tests next to code a pragmatic technique?