[Python-Dev] light-weight testing

Ben Finney ben+python at benfinney.id.au
Thu Jul 17 14:00:00 CEST 2008


Antoine Pitrou <solipsis at pitrou.net> writes:
> For what it's worth, I've been using nose for quite a long time and
> the first reason I did so is, like you, because I wanted to write
> tests in a light way (without having to declare classes).
>> Then after writing some dozens of tests I switched back to wrapping
> tests in classes, just because it makes tests more readable and
> better organized (especially when you come to have setup/teardown
> functions shared by several tests).
>> (but nose is still very nice)

It's also entirely compatible with wrapping one's tests in classes.
The test discovery and collection in 'nose' is one of the attractions:
it discovers them at package, module, class, and plain-function level,
whether doctest or not, whether unittest or not, and collects them all
to run.
-- 
 \ “Well, my brother says Hello. So, hooray for speech therapy.” |
 `\ —Emo Philips |
_o__) |
Ben Finney


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /