unittest vs py.test?
Roy Smith
roy at panix.com
Fri Apr 1 20:26:50 EST 2005
In article <_4-dnaRR8dv8dNDfRVn-tg at powergate.ca>,
Peter Hansen <peter at engcorp.com> wrote:
> As for Roy's comments: I use a small internally
> developed driver script which uses os.walk to find
> all the files matching tests/*_unit.py or tests/story*.py
> in all subfolders of the project, and which runs them
> in separate processes to ensure none can pollute
> the environment in which other tests run. I can
> dispense with the unittest.main() call, but I like
> to be able to run the tests standalone. I guess
> with py.test I couldn't do that...
Actually, I believe it does. I'm just starting to play with this, but it
looks like you can do:
py.test test_sample.py
and it'll run a single test file. I imagine you could use your os.walk
fixture in combination with this to run each test in its own process if you
wanted to.
More information about the Python-list
mailing list