New submission from אורי רודברג firstname.lastname@example.org:
I think some functions of `class TestCase` are not documented correctly in the docs. For example in https://docs.python.org/3.5/library/unittest.html and also https://docs.python.org/3.6/library/unittest.html and https://docs.python.org/3.7/library/unittest.html.
Some of the functions which are not documented correctly:
assertListEqual assertSetEqual assertDictEqual assertIsNone
And many other functions.
You can see some more details on https://github.com/python/typeshed/issues/2716.
---------- assignee: docs@python components: Documentation messages: 333137 nosy: docs@python, אורי רודברג priority: normal severity: normal status: open title: class TestCase: docs are not correct versions: Python 3.5, Python 3.6, Python 3.7
אורי רודברג email@example.com added the comment:
1. I think the main problem is where it's documented "first, second" while the real argument names are different.
2. I think maybe https://docs.python.org/2.7/library/unittest.html 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)
---------- versions: +Python 2.7
Karthikeyan Singaravelan firstname.lastname@example.org added the comment:
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 : https://mail.python.org/pipermail/python-dev/2010-December/106875.html
I think this is a bug as seen from typeshed https://github.com/python/typeshed/pull/2724/. 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.
---------- nosy: +ezio.melotti, xtreak title: class TestCase: docs are not correct -> unittest assert helper methods have incorrect signature in docs versions: -Python 3.4, Python 3.5, Python 3.6
Change by Brett Cannon email@example.com:
---------- nosy: +michael.foord, rbcollins
Change by Irit Katriel firstname.lastname@example.org:
---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.7, Python 3.8