In recent versions of test-is, it appears that exceptions are only
caught inside of the 'is' macro, as opposed to during the whole test
run. This is a problem when running test-is from slime, because when a
test throws an exception outside of the 'is' macro, it requires user
intervention to handle the uncaught exception.

The following modification to test-var worked for me:

diff --git a/src/clojure/contrib/test_is.clj b/src/clojure/contrib/
test_is.clj
index 6a91132..cb97c0b 100644
--- a/src/clojure/contrib/test_is.clj
+++ b/src/clojure/contrib/test_is.clj
@@ -213,7 +213,10 @@
   (when-let [t (:test (meta v))]
       (binding [*test-name* (str v)]
         (report-count :test)
-        (t))))
+       (try
+        (t)
+        (catch Throwable ex
+          (report :error (str "uncaught exception while running "
*test-name*) nil ex))))))


I didn't use try-expr because it prints "expected: (t)" when reporting
the failure, because (t) is the name of the local variable inside of
test-var.

Allen
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to