Making light table play nicely with clojure.test #114

Closed
olivergeorge opened this Issue Aug 29, 2012 · 4 comments

Comments

Projects
None yet
5 participants

Hi

I'm trying to write code using light table and use tests but I'm only getting a terse summary report from (run-tests). Looks like I'm not getting the stdout reporting, only the result of calling (run-tests).

I can fix this by rebinding test-out to out.

(binding [*test-out* *out*]
  (run-tests))

Is is possible that out is bound to something odd when clojure.test loads?

cheers, Oliver

PS. Just an idle related thought. I'd like to have a set of tests run (instarepl style) as I'm coding in Table mode. If a test fails I want to see what values where passing through functions (instarepl style).

I second this idea: I'd like to have a set of tests run (instarepl style) as I'm coding in Table mode. If a test fails I want to see what values where passing through functions (instarepl style).
That sounds very nice!

mynomoto commented Nov 7, 2013

In LT 0.5.17 *test-out* is bound to *out*.
This issue should be closed.

@ibdknox ibdknox closed this Nov 7, 2013

Thanks, yes.

Also the custom-eval feature now provides a way to run tests through a key binding.

For example:

{:+ {:editor.clj {"pmeta-r" [(:eval.custom
                          "(clojure.test/run-all-tests
                             (re-pattern
                               (str \"^\" *ns* \".*\")))"
                          {:result-type :statusbar})]}}}

For anyone trying this with the new flat format, the (:eval.custom "code" {:result-type :statusbar}) should not be in an array. The above key binding entry would therefore look like this:

 [:editor.clj "pmeta-r" (:eval-custom
                         "(clojure.test/run-all-tests
                            (re-pattern
                              (str \"^\" *ns* \".*\")))"
                         {:result-type :statusbar})]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment