2009/9/29 Timothy Pratley <[email protected]>:
[...]
> Secondly I'd like to know how to invoke my tests conveniently. Options
> I've explored:
> 1) put (run-tests) at the bottom of the file. Great for while I'm
> coding, bad when including as a library.

By the way, this is exactly the sort of thing that Python's 'if
__name__ == "__main__"' thing is good for and often used for, so if
the file is run as "python somefile.py" the test will be true and the
code will be executed, but if imported into a script as "import
somefile" the test will be false and the code will not be executed.

[...]
> Perhaps I could make a script clj-test foo.clj <verbose> that loads
> the file, sets a *verbose-tests* flag, and executes (run-tests). Or
> are there other approaches?

That sounds reasonable to me.

-- 
Michael Wood <[email protected]>

--~--~---------~--~----~------------~-------~--~----~
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