Repository navigation
Use self.assertRaises instead of try/except in ctypes/test_functions.py::test_mro #90036
Copy link
Copy link
Closed
Closed
Copy link
Labels
3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes3.9 (EOL)end of lifeend of lifetestsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Activity
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.- addedtestsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Nov 23, 2021 - added3.9 (EOL)end of lifeend of life3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes
on Nov 23, 2021
Metadata
Metadata
Assignees
Labels
3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes3.9 (EOL)end of lifeend of lifetestsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
try/excepttoself.assertRaisesinLib/ctypes/test/test_functions.py#29721try/excepttoself.assertRaisesinLib/ctypes/test/test_functions.py(GH-29721) #29722try/excepttoself.assertRaisesinLib/ctypes/test/test_functions.py(GH-29721) #29723try/excepttoself.assertRaisesinLib/ctypes/test/test_functions.py(GH-29721) #29748Note: 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:
bugs.python.org fields: