testing

Testing tools, testing philosophy & methodology...
orestis 2020-07-16T13:25:25.073200Z

Is there a known thing in clojure.test that the *ns* is bound to user ? I’m trying to use a macro to generate temp databases that are unique to the namespace and it seems that both Kaocha and cognitect/test-runner will set the namespace to user , probably doing the test discovery phase?

orestis 2020-07-16T13:25:35.073600Z

Running the tests frmo the repl works just fine.

orestis 2020-07-16T13:34:52.074500Z

Huh, when you require a namespace, the *ns* var is not set to the “required” namespace, but stays to user…

seancorfield 2020-07-16T16:15:19.075800Z

(for folks here who are not in #clojure-dev that discussion shifted there and was answered -- TL;DR: it's the intended behavior)

orestis 2020-07-16T17:17:37.077700Z

Yeah I think I should delete the noise? I started from kaocha, shifted to testing after I tried cognitect/test-runner, then to clojure-dev with the root repro

seancorfield 2020-07-16T17:22:10.077900Z

Your call. I just wanted to tie up the loose end that the posts seem to be. 🙂