Re: Running all unit tests

2009-02-07 Thread Jason Voegele
Ben Finney wrote:
 Jason Voegele ja...@jvoegele.com writes:
 
 What's the recommended approach for Python programs? I'm sure I
 could write a shell script (or a Python script even) that scans my
 test directory for test cases and runs them, but I'm wondering if
 there's something already built in that could do this for me.
 
 The lack of a built-in ???collect and run all the tests in this working
 tree??? in the Python unit test system is a known problem; discussions
 are ongoing what to do about it.
 
 Meanwhile, the third-party ???nose??? system
 URL:http://somethingaboutorange.com/mrl/projects/nose/ provides this
 and much more, while remaining compatible with both testing systems in
 the standard library.
 
 I generally set up a ???test??? target in my Makefile, such that it will
 use ???nosetests??? to collect and run all the tests; then I just run
 ???make test??? in a loop that is triggered by any filesystem change in my
 project working tree.

Thanks to all for the helpful responses.  It's good to know I'm not the only 
one that has thought of this as a shortcoming.

-- 
Jason Voegele
Different all twisty a of in maze are you, passages little.


--
http://mail.python.org/mailman/listinfo/python-list


Running all unit tests

2009-02-06 Thread Jason Voegele
I'm working on my first substantial Python project, and I'm following a fully 
test-first approach.  I'd like to know how Pythonistas typically go about 
running all of their tests to ensure that my application stays green.

In Ruby, I would have a Rake task so that I could say rake test and all 
tests would be executed.  In C or C++ I would have a make target so I could 
run all my tests with make test.  In Java it would be an Ant task and ant 
test.  And so forth and so on.

What's the recommended approach for Python programs?  I'm sure I could write 
a shell script (or a Python script even) that scans my test directory for 
test cases and runs them, but I'm wondering if there's something already 
built in that could do this for me.

-- 
Jason Voegele
Only fools are quoted.
-- Anonymous


--
http://mail.python.org/mailman/listinfo/python-list