A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2005-December/058995.html below:

[Python-Dev] Patch to make unittest.TestCase easier to subclass

[Python-Dev] Patch to make unittest.TestCase easier to subclass [Python-Dev] Patch to make unittest.TestCase easier to subclassCollin Winter collinw at gmail.com
Thu Dec 22 16:11:02 CET 2005
Hello all!

I just submitted Patch #1388073, designed to make unittest's TestCase
class easier to subclass, and I'd appreciate a review of/feedback on
the code there.

While recently working on a subclass of unittest.TestCase to support
TODO-tests, I found a large number of __-prefixed attributes in
TestCase. The presence of these attributes meant that I had to copy
several methods over to my new subclass in order for things to work.

The patch I've provided converts these __-prefixed attributes to
_-prefixed attributes, making it much simpler to subclass TestCase.
The patch is against unittest.py from SVN revision 41775.

Included with the patch are "before" and "after" versions of my
subclass showing the impact of the change to unittest.TestCase.

Thanks,
Collin Winter
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