A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-February/097523.html below:

[Python-Dev] setUpClass and setUpModule in unittest

[Python-Dev] setUpClass and setUpModule in unittest [Python-Dev] setUpClass and setUpModule in unittestAntoine Pitrou solipsis at pitrou.net
Tue Feb 9 18:57:14 CET 2010
Le Tue, 09 Feb 2010 16:42:50 +0000, Michael Foord a écrit :
> 
> The next 'big' change to unittest will (may?) be the introduction of
> class and module level setUp and tearDown. This was discussed on
> Python-ideas and Guido supported them. They can be useful but are also
> very easy to abuse (too much shared state, monolithic test classes and
> modules). Several authors of other Python testing frameworks spoke up
> *against* them, but several *users* of test frameworks spoke up in
> favour of them. ;-)

One problem is that it is not obvious what happens with inheritance.
If I have a class-level setUp for class B, and class C inherits from B, 
will there be a separate invocation of setUp for C, or not?
(I guess both possibilities have use cases)


Antoine.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4