I am attempting to replace the stacktrace-file-and-line (private) function in clojure.test, but using with-redefs-fn when running tests seems to have no effect. When I execute the following code the original stacktrace-file-and-line is called instead of my anonymous function.
(with-redefs-fn
{#'clojure.test/stacktrace-file-and-line (fn [stacktrace] {:file "foo.clj" :line 1})}
#(clojure.test/run-tests 'repl-test.core-test))
Does with-redefs-fn not work with private function or is there something about the clojure.test namespace that is preventing this from working?