This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: In unittest doc change WidgetTestCase to SimpleWidgetTestCase in suite()
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: berker.peksag, docs@python, ezio.melotti, michael.foord, py.user, python-dev
Priority: normal Keywords: patch

Created on 2013-07-24 18:48 by py.user, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue18548.diff py.user, 2013-07-24 18:48 review
Messages (4)
msg193667 - (view) Author: py.user (py.user) * Date: 2013-07-24 18:48
http://docs.python.org/3/library/unittest.html#organizing-test-code
"""
def suite():
    suite = unittest.TestSuite()
    suite.addTest(WidgetTestCase('test_default_size'))
    suite.addTest(WidgetTestCase('test_resize'))
    return suite
"""
msg193877 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2013-07-29 15:51
This is a leftover from 2.7.  In 2.7 the docs have a SimpleWidgetTestCase used as base class for two other classes, and then the same example is reimplemented by using a single WidgetTestCase class.
I think it would be better to make the two docs converge, by renaming the SimpleWidgetTestCase in 3.x to WidgetTestCase, and get rid of the SimpleWidgetTestCase example in 2.7.
msg272075 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-08-05 23:59
New changeset d0402caa0ef5 by Berker Peksag in branch '3.5':
Issue #18548: Fix unittest.TestSuite() example
https://hg.python.org/cpython/rev/d0402caa0ef5

New changeset e17e3f620709 by Berker Peksag in branch 'default':
Issue #18548: Merge from 3.5
https://hg.python.org/cpython/rev/e17e3f620709
msg272076 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-08-06 00:00
Good catch, thanks! I went with Ezio's suggestion but left 2.7 documentation as is.
History
Date User Action Args
2022-04-11 14:57:48adminsetgithub: 62748
2016-08-06 00:00:56berker.peksagsetstatus: open -> closed

type: enhancement -> behavior
versions: + Python 3.5, Python 3.6, - Python 3.3, Python 3.4
nosy: + berker.peksag

messages: + msg272076
resolution: fixed
stage: patch review -> resolved
2016-08-05 23:59:33python-devsetnosy: + python-dev
messages: + msg272075
2013-07-29 15:51:55ezio.melottisetmessages: + msg193877
2013-07-26 23:06:11terry.reedysetnosy: + ezio.melotti, michael.foord
stage: patch review

versions: + Python 3.3
2013-07-24 18:48:41py.usercreate