          (maybe-show-slow-tests results options)
          (maybe-system-exit results options)
          results)))))
+
+(defn pretty-reload
+  ([] (pretty-reload [] {}))
+  ([tools-ns-args frame-options]
+   (require 'clojure.tools.namespace.repl)
+   (require 'io.aviso.exception)
+   (let [r (apply (resolve 'clojure.tools.namespace.repl/refresh) tools-ns-args)]
+     (when (instance? Throwable r)
+       ((resolve 'io.aviso.exception/write-exception) r))
+     r))
+  )


; test runner results

;; holds a persistent queue or a list or a vector (perf test this)
;; of test results, for later analysis by the runner
(def ^:dynamic *test-runner-state* nil)

(defn record-test-finished [m]
  (when *test-runner-state*

  :exit-with-error-code : an boolean (defaults to false)

  if set to a truthy value, calls (System/exit) after running, with exit code 0 if all the tests passed, or exit code 1 if any tests failed.

  :frame-options : an map (defaults to {:frame-limit 10})

  options for io.aviso.exception/write-exception. Defaults to just showing 10 lines from exception stacktraces. See (doc io.aviso.exception/write-exception) for full documentation."
  ([] (run-all-tests #".*"))
  ([ns-re] (run-all-tests ns-re {}))
  ([ns-re options]
   (let [writer (if (:force-real-stdout options) (java.io.PrintWriter. System/out) *out*)]
     (binding [*out* writer
               *frame-options* (:frame-options options *frame-options*)
               clojure.test/*test-out* writer
               *test-runner-state* (if (:show-slow-tests options)
                                     (atom {:last-test-finished (System/nanoTime) :results []}))]
