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: Use `self.assertRaises` instead of `try/except` in `ctypes/test_functions.py::test_mro`
Type: behavior 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: miss-islington, serhiy.storchaka, sobolevn
Priority: normal Keywords: patch

Created on 2021-11-23 09:32 by sobolevn, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 29721 merged sobolevn, 2021-11-23 09:37
PR 29722 closed miss-islington, 2021-11-23 11:12
PR 29723 merged miss-islington, 2021-11-23 11:12
PR 29748 merged miss-islington, 2021-11-24 11:57
PR 30258 merged serhiy.storchaka, 2021-12-26 09:58
PR 30259 merged serhiy.storchaka, 2021-12-26 10:00
PR 30260 merged miss-islington, 2021-12-26 10:37
Messages (7)
msg406829 - (view) Author: Nikita Sobolev (sobolevn) * (Python triager) Date: 2021-11-23 09:32
Right now this test uses `try: ... except TypeError: ...` to ensure that mro is consistent. This has a flaw: code in `try` might not ever raise and this test would still pass.

I will refactor it to use `self.assertRaises` to be 100% sure.
msg406836 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-11-23 11:12
New changeset b48ac6fe38b2fca9963b097c04cdecfc6083104e by Nikita Sobolev in branch 'main':
bpo-45878: convert `try/except` to `self.assertRaises` in `Lib/ctypes/test/test_functions.py` (GH-29721)
https://github.com/python/cpython/commit/b48ac6fe38b2fca9963b097c04cdecfc6083104e
msg409133 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-12-24 09:27
New changeset 393ff040281db818f2d6e0240919316f58f989a6 by Miss Islington (bot) in branch '3.9':
bpo-45878: convert `try/except` to `self.assertRaises` in `Lib/ctypes/test/test_functions.py` (GH-29721) (GH-29723)
https://github.com/python/cpython/commit/393ff040281db818f2d6e0240919316f58f989a6
msg409134 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-12-24 09:29
New changeset a9e0b2b49374df91c40fe409508cfcdc6332450e by Miss Islington (bot) in branch '3.10':
bpo-45878: convert `try/except` to `self.assertRaises` in `Lib/ctypes/test/test_functions.py` (GH-29721) (GH-29748)
https://github.com/python/cpython/commit/a9e0b2b49374df91c40fe409508cfcdc6332450e
msg409186 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-12-26 10:37
New changeset 11909c12c75a7f377460561abc97707a4006fc07 by Serhiy Storchaka in branch '3.10':
[3.10] Remove a NEWS entry for bpo-45878 (GH-30258)
https://github.com/python/cpython/commit/11909c12c75a7f377460561abc97707a4006fc07
msg409187 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-12-26 10:38
New changeset 1fb7c61ca76c6fbff4d90b272e34e92bc2c7d729 by Serhiy Storchaka in branch 'main':
Remove a NEWS entry for bpo-45878 (GH-30259)
https://github.com/python/cpython/commit/1fb7c61ca76c6fbff4d90b272e34e92bc2c7d729
msg409191 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-12-26 11:26
New changeset bee660e46ae2a051400177dcd758d95b5b4a6fcc by Miss Islington (bot) in branch '3.9':
[3.9] Remove a NEWS entry for bpo-45878 (GH-30258) (GH-30260)
https://github.com/python/cpython/commit/bee660e46ae2a051400177dcd758d95b5b4a6fcc
History
Date User Action Args
2022-04-11 14:59:52adminsetgithub: 90036
2021-12-26 11:26:02serhiy.storchakasetmessages: + msg409191
2021-12-26 10:38:23serhiy.storchakasetmessages: + msg409187
2021-12-26 10:37:57miss-islingtonsetpull_requests: + pull_request28481
2021-12-26 10:37:47serhiy.storchakasetmessages: + msg409186
2021-12-26 10:00:12serhiy.storchakasetpull_requests: + pull_request28480
2021-12-26 09:58:08serhiy.storchakasetpull_requests: + pull_request28479
2021-12-24 09:29:07serhiy.storchakasetmessages: + msg409134
2021-12-24 09:27:34serhiy.storchakasetmessages: + msg409133
2021-12-02 22:45:04sobolevnsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-11-24 11:57:49miss-islingtonsetpull_requests: + pull_request27985
2021-11-23 14:28:43AlexWaygoodsetversions: + Python 3.9, Python 3.10, Python 3.11
2021-11-23 11:12:27miss-islingtonsetpull_requests: + pull_request27960
2021-11-23 11:12:26serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg406836
2021-11-23 11:12:22miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request27959
2021-11-23 09:37:20sobolevnsetkeywords: + patch
stage: patch review
pull_requests: + pull_request27957
2021-11-23 09:32:54sobolevncreate