Skip to content

test_eightteen() in test_inspect out of sync with documentation #68729

Closed

Description

@vadmium
BPO 24541
Nosy @vadmium, @1st1

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 = <Date 2015-07-01.01:46:20.419>
created_at = <Date 2015-07-01.01:42:28.636>
labels = ['tests', 'docs']
title = 'test_eightteen() in test_inspect out of sync with documentation'
updated_at = <Date 2015-07-01.02:08:56.463>
user = 'https://github.com/vadmium'

bugs.python.org fields:

activity = <Date 2015-07-01.02:08:56.463>
actor = 'yselivanov'
assignee = 'docs@python'
closed = True
closed_date = <Date 2015-07-01.01:46:20.419>
closer = 'yselivanov'
components = ['Documentation', 'Tests']
creation = <Date 2015-07-01.01:42:28.636>
creator = 'martin.panter'
dependencies = []
files = []
hgrepos = []
issue_num = 24541
keywords = []
message_count = 6.0
messages = ['246012', '246014', '246015', '246016', '246018', '246019']
nosy_count = 4.0
nosy_names = ['docs@python', 'python-dev', 'martin.panter', 'yselivanov']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue24541'
versions = ['Python 3.5', 'Python 3.6']

Activity

  1. vadmium commented on Jul 1, 2015

    @vadmium
    MemberAuthor

    Revision 0b7c313851ca highlights an inconsistency in the test case at the top of the TestPredicates class. After removing isawaitable() in bpo-24400, there are now actually eighteen is* functions. The comment in the test case still says there are sixteen (from before the two iscoroutine* functions were added), and so does the documentation it references: ‘The sixteen functions whose names begin with “is” ’ <https://docs.python.org/3.5/library/inspect.html#types-and-members\>. The quick fix is to change all the numbers to eighteen.

    But maybe a better fix is to drop it all and rewrite the documentation to just say �“The functions whose names begin with “is” are mainly provided . . .”.

  2. added
    docsDocumentation in the Doc dir
    testsTests in the Lib/test dir
    on Jul 1, 2015
  3. python-dev commented on Jul 1, 2015

    python-devmannequin
    Mannequin

    New changeset a5c6eaa7d733 by Yury Selivanov in branch '3.5':
    Issue bpo-24541: Update comment in test_inspect.test_eightteen
    https://hg.python.org/cpython/rev/a5c6eaa7d733

  4. 1st1 commented on Jul 1, 2015

    @1st1
    Member

    This has already been fix (see bpo-24400). I've also updated the comment (16 -> 18). Let's keep the test as is.

  5. vadmium commented on Jul 1, 2015

    @vadmium
    MemberAuthor

    Okay but what about the documentation? It still claims sixteen.

    # This test is here for remember you to update Doc/library/inspect.rst

  6. python-dev commented on Jul 1, 2015

    python-devmannequin
    Mannequin

    New changeset bd45435fd081 by Yury Selivanov in branch '3.5':
    Issue bpo-24541: Drop test_inspect.test_eightteen unittest; update docs
    https://hg.python.org/cpython/rev/bd45435fd081

  7. 1st1 commented on Jul 1, 2015

    @1st1
    Member

    Thanks for pushing this Martin. I didn't notice that you suggested to update inspect.rst as well. And it does make sense to just remove the number of is* functions from the docs (and after that we don't need the unittest).

  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 dirtestsTests in the Lib/test dir

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions