Not sure about your specific case, but when you don't get back
expected results it's usually due to the functions called being lazy.
Try doall or dorun to force the iterations.

-Rgds, Adrian.

On Tue, Apr 27, 2010 at 12:25 AM, David McNeil <[email protected]> wrote:
> I am experimenting with clojure.test and I encountered the following
> situation which I cannot explain.
>
> This code:
>
> (println (do
>           (ns ns01
>             (:use clojure.test))
>           (deftest test1 nil)
>           (run-tests)))
>
> Produces the expected result (note: it runs one test):
>
>    Testing ns01
>
>    Ran 1 tests containing 0 assertions.
>    0 failures, 0 errors.
>    {:type :summary, :test 1, :pass 0, :fail 0, :error 0}
>
> However, if I do the exact same thing inside of a let:
>
> (println (let []
>           (do
>             (ns ns02
>               (:use clojure.test))
>             (deftest test1 nil)
>             (run-tests))))
>
> Then I get the unexpected result that no tests are executed:
>
>    Testing ns02
>
>    Ran 0 tests containing 0 assertions.
>    0 failures, 0 errors.
>    {:type :summary, :test 0, :pass 0, :fail 0, :error 0}
>
> Seems there is something going on with namespaces that I do not
> understand and I hope that somewhere here can explain it.
>
> Thank you.
> -David McNeil
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to