[New-bugs-announce] [issue45878] Use `self.assertRaises` instead of `try/except` in `ctypes/test_functions.py::test_mro`

Nikita Sobolev report at bugs.python.org
Tue Nov 23 04:32:54 EST 2021


New submission from Nikita Sobolev <mail at sobolevn.me>:

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.

----------
components: Tests
messages: 406829
nosy: sobolevn
priority: normal
severity: normal
status: open
title: Use `self.assertRaises` instead of `try/except` in `ctypes/test_functions.py::test_mro`
type: behavior

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45878>
_______________________________________


More information about the New-bugs-announce mailing list