← Back to DAGDA | Support | Source: https://bugs.python.org/issue25479

➜

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.

classification
Title: Increase unit test coverage for abc.py
Type: enhancement Stage: resolved
Components: Tests Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: iritkatriel, karlcow, miss-islington, szymon
Priority: normal Keywords: easy, patch

Created on 2015-10-26 03:14 by szymon, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
mywork.patch szymon, 2015-10-26 03:14 Patch to increase test coverage of abc.py review
Pull Requests
URL Status Linked Edit
PR 24034 merged karlcow, 2021-01-01 01:00
PR 26063 merged miss-islington, 2021-05-12 13:05
PR 26065 merged iritkatriel, 2021-05-12 13:33
Messages (7)
msg253453 - (view) Author: Szymon Trapp (szymon) Date: 2015-10-26 03:14
Added a new function to unit tests for abc.py to increase the test coverage, specifically for the usage of __subclasshook__.

This will cover lines 209-214.

Note: this is my first submission to Python and I'm following the advice to start with the unit tests coverage.
msg381912 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2020-11-26 19:53
The patch needs to be converted to a github PR.
msg384144 - (view) Author: karl (karlcow) * Date: 2021-01-01 01:02
@iritkatriel Github PR done. 
https://github.com/python/cpython/pull/24034
msg384167 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-01-01 13:40
This PR probably doesn't improve test coverage because the feature is tested indirectly (and directly from test_typing). But I think this test should be added nevertheless for completeness and to demonstrate how the feature works. 

That said, this test shows that the documentation of issubclass is not quite accurate when it states that "a class is considered a subclass of itself" 
 (https://docs.python.org/3/library/functions.html#issubclass).  

That should probably be a separate bpo.
msg393510 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-05-12 13:45
New changeset 1be93960612b29686d42c021f842e63e5143a625 by Miss Islington (bot) in branch '3.9':
bpo-25479: add unit test for __subclasshook__ in test_abc.py (GH-24034) (GH-26063)
https://github.com/python/cpython/commit/1be93960612b29686d42c021f842e63e5143a625
msg393515 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-05-12 14:06
New changeset bd5dfd6c8c133ccda4dddcba3a8c5a9ea1aa1d6b by Irit Katriel in branch '3.10':
[3.10] bpo-25479: add unit test for __subclasshook__ in test_abc.py (GH-24034) (GH-26065)
https://github.com/python/cpython/commit/bd5dfd6c8c133ccda4dddcba3a8c5a9ea1aa1d6b
msg393538 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-05-12 17:50
Thank you!
History
Date User Action Args
2022-04-11 14:58:23adminsetgithub: 69665
2021-05-12 17:50:16iritkatrielsetstatus: open -> closed
resolution: fixed
messages: + msg393538

stage: patch review -> resolved
2021-05-12 14:06:39iritkatrielsetmessages: + msg393515
2021-05-12 13:45:28iritkatrielsetmessages: + msg393510
2021-05-12 13:33:01iritkatrielsetpull_requests: + pull_request24706
2021-05-12 13:05:58miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request24704
2021-05-12 13:04:42iritkatrielsetversions: + Python 3.9, Python 3.11
2021-01-01 13:40:26iritkatrielsetversions: - Python 3.8, Python 3.9
2021-01-01 13:40:19iritkatrielsetmessages: + msg384167
2021-01-01 01:02:14karlcowsetmessages: + msg384144
2021-01-01 01:00:20karlcowsetkeywords: + patch
nosy: + karlcow
pull_requests: + pull_request22875
2020-11-27 11:20:13iritkatrielsetkeywords: + easy, - patch, easy (C)
2020-11-26 19:53:23iritkatrielsetversions: + Python 3.8, Python 3.9, Python 3.10, - Python 3.6
nosy: + iritkatriel

messages: + msg381912

keywords: + easy (C)
2015-10-27 17:07:42brett.cannonsetstage: patch review
2015-10-26 03:14:01szymoncreate