Skip to content

unittest assert helper methods have incorrect signature in docs #79857

Description

@ghost
BPO 35676
Nosy @rbtcollins, @ezio-melotti, @voidspace, @tirkarthi

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2019-01-07.04:17:47.372>
labels = ['3.11', '3.9', '3.10', 'docs']
title = 'unittest assert helper methods have incorrect signature in docs'
updated_at = <Date 2021-04-25.16:15:40.381>
user = None

bugs.python.org fields:

activity = <Date 2021-04-25.16:15:40.381>
actor = 'iritkatriel'
assignee = 'docs@python'
closed = False
closed_date = None
closer = None
components = ['Documentation']
creation = <Date 2019-01-07.04:17:47.372>
creator = '\xd7\x90\xd7\x95\xd7\xa8\xd7\x99'
dependencies = []
files = []
hgrepos = []
issue_num = 35676
keywords = []
message_count = 3.0
messages = ['333137', '333139', '333163']
nosy_count = 6.0
nosy_names = ['rbcollins', 'ezio.melotti', 'michael.foord', 'docs@python', 'xtreak', '\xd7\x90\xd7\x95\xd7\xa8\xd7\x99']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue35676'
versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

Linked PRs

Activity

  1. ghost commented on Jan 7, 2019

    @ghost
    Author

    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 python/typeshed#2716.

  2. Repository owner added on Jan 7, 2019
  3. Repository owner added
    docsDocumentation in the Doc dir
    on Jan 7, 2019
  4. ghost commented on Jan 7, 2019

    @ghost
    Author
    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)
  5. Repository owner added on Jan 7, 2019
  6. tirkarthi commented on Jan 7, 2019

    @tirkarthi
    Member

    Thanks for the report. Looking at git history it seems there were some changes done in bpo-10573 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 python/typeshed#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.

  7. changed the title [-]class TestCase: docs are not correct[/-] [+]unittest assert helper methods have incorrect signature in docs[/+] on Jan 7, 2019
  8. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions