[issue18548] In unittest doc change WidgetTestCase to SimpleWidgetTestCase in suite()
New submission from py.user: 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 """ ---------- assignee: docs@python components: Documentation files: issue.diff keywords: patch messages: 193667 nosy: docs@python, py.user priority: normal severity: normal status: open title: In unittest doc change WidgetTestCase to SimpleWidgetTestCase in suite() type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file31029/issue.diff _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue18548> _______________________________________
Changes by Terry J. Reedy <tjreedy@udel.edu>: ---------- nosy: +ezio.melotti, michael.foord stage: -> patch review versions: +Python 3.3 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue18548> _______________________________________
Ezio Melotti added the comment: 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. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue18548> _______________________________________
Roundup Robot added the comment: 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 ---------- nosy: +python-dev _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue18548> _______________________________________
Berker Peksag added the comment: Good catch, thanks! I went with Ezio's suggestion but left 2.7 documentation as is. ---------- nosy: +berker.peksag resolution: -> fixed stage: patch review -> resolved status: open -> closed type: enhancement -> behavior versions: +Python 3.5, Python 3.6 -Python 3.3, Python 3.4 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue18548> _______________________________________
participants (5)
-
Berker Peksag
-
Ezio Melotti
-
py.user
-
Roundup Robot
-
Terry J. Reedy