Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
vadmium opened this issue Jul 1, 2015 · 6 comments
Closed

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

vadmium opened this issue Jul 1, 2015 · 6 comments
Labels
docs Documentation in the Doc dir tests Tests in the Lib/test dir

Comments

@vadmium
Copy link
Member

vadmium commented Jul 1, 2015

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']

@vadmium
Copy link
Member Author

vadmium commented Jul 1, 2015

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 . . .”.

@vadmium vadmium added docs Documentation in the Doc dir tests Tests in the Lib/test dir labels Jul 1, 2015
@python-dev
Copy link
Mannequin

python-dev mannequin commented Jul 1, 2015

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

@1st1
Copy link
Member

1st1 commented Jul 1, 2015

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

@1st1 1st1 closed this as completed Jul 1, 2015
@vadmium
Copy link
Member Author

vadmium commented Jul 1, 2015

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

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

@python-dev
Copy link
Mannequin

python-dev mannequin commented Jul 1, 2015

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

@1st1
Copy link
Member

1st1 commented Jul 1, 2015

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).

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir tests Tests in the Lib/test dir
Projects
None yet
Development

No branches or pull requests

2 participants