[Python-Dev] Proposed unittest changes
Ben Finney
ben+python at benfinney.id.au
Wed Jul 16 15:00:51 CEST 2008
Ron Adam <rrr at ronadam.com> writes:
> +1 for a simpler testing module.
I've no objection.
> Just letting you know there is interest in a lighter weight testing
> suite.
'doctest' is a very simple testing module, that is a very useful tool.
> Looking at the unittest discussions, it doesn't look like it is
> getting easier to use, but more complex.
How so?
One PEP proposed this week specifies to do nothing but conform
'unittest' with the standard library guidelines, and remove redundant
names. That surely makes it simpler to use.
Another PEP specifies to add helper methods that simplify a number of
common cases.
What is it you see making unittest "more complex to use"?
> Py.test looks very interesting, especially the test discovery parts.
> I also agree we don't need special methods for every variation of
> assertedness.
My main complaint about 'py.test' is that it's yet-another-framework.
We already have 'doctest' and 'unittest', and they play together
reasonably well.
'nose' <URL:http://somethingaboutorange.com/mrl/projects/nose/> looks
better for consideration, especially since it integrates well with
'unittest'.
> I've been thinking that a few decorators may go a long way to making
> writing tests easy. It also reduces the level of indentation needed.
There are a number of these already in 'nose'.
--
\ “I fly Air Bizarre. You buy a combination one-way round-trip |
`\ ticket. Leave any Monday, and they bring you back the previous |
_o__) Friday. That way you still have the weekend.” —Steven Wright |
Ben Finney
More information about the Python-Dev
mailing list