[Python-ideas] Test Class setup and teardown in unittest

Holger Krekel holger.krekel at gmail.com
Thu Jan 21 21:18:45 CET 2010

On Thu, Jan 21, 2010 at 6:09 PM, Guido van Rossum <guido at python.org> wrote:
> Ignoring many of the finer points brought up here, and putting
> practicality before purity, I think having setUpClass and
> tearDownClass methods is a great idea.
> While we're at it I would also recommend adding module-level setUp and
> tearDown function -- Google's extension of pyunit implements these and
> they are often handy for a variety of use cases.

If going for that i'd rather like to see those named
setup_class/teardown_class and setup_module/teardown_module like
py.test and nose do for a long time now. When i first went for those i
actually did so because i wanted to follow PEP8 ... But the stronger
argument now is that it would be cool seeing some tool/approach
convergence and unittest is the new kid on the setup-block there :)


> --
> --Guido van Rossum (python.org/~guido)
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas

More information about the Python-ideas mailing list