[TIP] Unittest Changes
jml at mumak.net
Sun Jul 20 22:36:00 PDT 2008
On Mon, Jul 21, 2008 at 3:22 PM, Christoph Zwerschke <cito at online.de> wrote:
> Jonathan Lange schrieb:
> > The aim is to incorporate improvements to unittest that have stood the
> > test of time in real projects, rather than to come up with blue-sky
> > features.
> I think the new features of JUnit4 should also be taken into
> consideration (see e.g. http://www.devx.com/Java/Article/31983)
> for a remake of pyUnit. For instance, I sometimes missed setup and
> teardown methods that are executed only once per Test class.
Perhaps. It's worth treading carefully where Shared Fixtures are
concerned. They tend to lead to Erratic Tests and Fragile Tests.
Twisted added setUpClass and tearDownClass to Trial and they have
caused us nothing but grief. To be fair, they were added before
classmethod was added to Python, which caused much of the pain.
I would much rather see something like testresources become
standard, but only after it gets more use.
More information about the testing-in-python