So this was definitely non-obvious, but I did manage to make it work. I
overrode do-report (with with-redefs since it's not dynamic) and then used
the stack frame trick as Jeff suggested. I did also have to de-munge the
class name since the file from the stack trace element is only the file
short
Hi Jeff,
Sorry for the late reply - that's great, thanks very much, looks like I can
hack something together with that.
Cheers,
Colin
On 11 July 2014 03:12, Jeff Valk jv-li...@tx.rr.com wrote:
You could override the clojure.test/do-report implementation and use the
same stack frame trick
Hi all,
Cursive provides test functionality that paints pass/fail markers in the
editors when tests are running. This all works great, except when someone
defines a test that calls a function containing is forms in another
namespace. An example:
(ns foo.core-test
(:require [clojure.test :refer
You could override the clojure.test/do-report implementation and use the
same stack frame trick that the default :fail case uses. Then from there,
either use the file name from the StackTraceElement, or demunge the method
name to get the var. I wouldn't really call that obvious, though. :-)