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: Use assertEqual in test_pydoc
Type: enhancement Stage:
Components: Tests Versions: Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: Claudiu.Popa, python-dev, rhettinger
Priority: normal Keywords: patch

Created on 2014-06-17 05:27 by Claudiu.Popa, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
modernize_test_pydoc.patch Claudiu.Popa, 2014-06-17 05:27 review
Messages (4)
msg220793 - (view) Author: PCManticore (Claudiu.Popa) * (Python triager) Date: 2014-06-17 05:27
Hello. Here's a patch which uses self.assertEqual in various places across test_pydoc, instead of the current idiom:

if result != expected_text:
   print_diffs(expected_text, result)
   self.fail("outputs are not equal, see diff above")
msg220796 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2014-06-17 05:40
This looks like a nice improvement.
msg221189 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-06-21 19:08
New changeset b1c7f28f9c0a by Raymond Hettinger in branch 'default':
Issue 21786:  Clean-up test_pydoc taking taking advantage of diffing in unittest.
http://hg.python.org/cpython/rev/b1c7f28f9c0a
msg221190 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2014-06-21 19:09
Thanks for the patch.
History
Date User Action Args
2022-04-11 14:58:05adminsetgithub: 65985
2014-06-21 19:09:35rhettingersetstatus: open -> closed
resolution: fixed
messages: + msg221190
2014-06-21 19:08:31python-devsetnosy: + python-dev
messages: + msg221189
2014-06-21 03:08:52rhettingersetassignee: rhettinger
2014-06-17 05:40:09rhettingersetnosy: + rhettinger
messages: + msg220796
2014-06-17 05:27:54Claudiu.Popasettitle: Use self.assertEqual in test_pydoc -> Use assertEqual in test_pydoc
2014-06-17 05:27:42Claudiu.Popacreate