You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use self.assertRaises instead of try/except in ctypes/test_functions.py::test_mro #90036
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.
New changeset b48ac6f by Nikita Sobolev in branch 'main': bpo-45878: convert try/except to self.assertRaises in [Lib/ctypes/test/test_functions.py](https://github.com/python/cpython/blob/main/Lib/ctypes/test/test_functions.py) (GH-29721) b48ac6f
New changeset 393ff04 by Miss Islington (bot) in branch '3.9': bpo-45878: convert try/except to self.assertRaises in [Lib/ctypes/test/test_functions.py](https://github.com/python/cpython/blob/main/Lib/ctypes/test/test_functions.py) (GH-29721) (GH-29723) 393ff04
New changeset a9e0b2b by Miss Islington (bot) in branch '3.10': bpo-45878: convert try/except to self.assertRaises in [Lib/ctypes/test/test_functions.py](https://github.com/python/cpython/blob/main/Lib/ctypes/test/test_functions.py) (GH-29721) (GH-29748) a9e0b2b
Activity
sobolevn commentedon Nov 23, 2021
Right now this test uses
try: ... except TypeError: ...to ensure that mro is consistent. This has a flaw: code intrymight not ever raise and this test would still pass.I will refactor it to use
self.assertRaisesto be 100% sure.serhiy-storchaka commentedon Nov 23, 2021
New changeset b48ac6f by Nikita Sobolev in branch 'main':
bpo-45878: convert
try/excepttoself.assertRaisesin[Lib/ctypes/test/test_functions.py](https://github.com/python/cpython/blob/main/Lib/ctypes/test/test_functions.py)(GH-29721)b48ac6f
serhiy-storchaka commentedon Dec 24, 2021
New changeset 393ff04 by Miss Islington (bot) in branch '3.9':
bpo-45878: convert
try/excepttoself.assertRaisesin[Lib/ctypes/test/test_functions.py](https://github.com/python/cpython/blob/main/Lib/ctypes/test/test_functions.py)(GH-29721) (GH-29723)393ff04
serhiy-storchaka commentedon Dec 24, 2021
New changeset a9e0b2b by Miss Islington (bot) in branch '3.10':
bpo-45878: convert
try/excepttoself.assertRaisesin[Lib/ctypes/test/test_functions.py](https://github.com/python/cpython/blob/main/Lib/ctypes/test/test_functions.py)(GH-29721) (GH-29748)a9e0b2b
serhiy-storchaka commentedon Dec 26, 2021
New changeset 11909c1 by Serhiy Storchaka in branch '3.10':
[3.10] Remove a NEWS entry for bpo-45878 (GH-30258)
11909c1
serhiy-storchaka commentedon Dec 26, 2021
New changeset 1fb7c61 by Serhiy Storchaka in branch 'main':
Remove a NEWS entry for bpo-45878 (GH-30259)
1fb7c61
serhiy-storchaka commentedon Dec 26, 2021
New changeset bee660e by Miss Islington (bot) in branch '3.9':
[3.9] Remove a NEWS entry for bpo-45878 (GH-30258) (GH-30260)
bee660e