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.

Title: unittest assert helper methods have incorrect signature in docs
Type: Stage:
Components: Documentation Versions: Python 3.11, Python 3.10, Python 3.9
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, ezio.melotti, michael.foord, rbcollins, xtreak, אורי
Priority: normal Keywords:

Created on 2019-01-07 04:17 by אורי, last changed 2022-04-11 14:59 by admin.

Messages (3)
msg333137 - (view) Author: אורי (אורי) Date: 2019-01-07 04:17
I think some functions of `class TestCase` are not documented correctly in the docs. For example in and also and

Some of the functions which are not documented correctly:


And many other functions.

You can see some more details on
msg333139 - (view) Author: אורי (אורי) Date: 2019-01-07 04:27
1. I think the main problem is where it's documented "first, second" while the real argument names are different.

2. I think maybe is also affected in functions such as:

assertGreater(first, second, msg=None)
assertGreaterEqual(first, second, msg=None)
assertLess(first, second, msg=None)
assertLessEqual(first, second, msg=None)
msg333163 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2019-01-07 15:15
Thanks for the report. Looking at git history it seems there were some changes done in issue10573 to use (actual, expected) for consistency and later changed to use (first, second) in the same issue at msg126911. Discussion for the issue :

I think this is a bug as seen from typeshed But I will defer it to the maintainer to take a call on the same given there was a discussion in the past.

Removing versions that are on security fix only mode. I am changing the subject. Feel free to reword/revert.
Date User Action Args
2022-04-11 14:59:10adminsetgithub: 79857
2021-04-25 16:15:40iritkatrielsetversions: + Python 3.9, Python 3.10, Python 3.11, - Python 2.7, Python 3.7, Python 3.8
2019-01-08 19:03:18brett.cannonsetnosy: + rbcollins, michael.foord
2019-01-07 15:15:59xtreaksetnosy: + ezio.melotti, xtreak
title: class TestCase: docs are not correct -> unittest assert helper methods have incorrect signature in docs
messages: + msg333163

versions: - Python 3.4, Python 3.5, Python 3.6
2019-01-07 04:30:16אוריsetversions: + Python 3.4, Python 3.8
2019-01-07 04:27:43אוריsetmessages: + msg333139
versions: + Python 2.7
2019-01-07 04:17:47אוריcreate