[New-bugs-announce] [issue46262] Error path in `_missing_()` is not covered for `enum.Flag` and `enum.IntFlag`
Nikita Sobolev
report at bugs.python.org
Tue Jan 4 17:36:29 EST 2022
New submission from Nikita Sobolev <mail at sobolevn.me>:
I've noticed that `enum.Flag._missing_` has some uncovered paths.
For example, this error is never checked: https://github.com/python/cpython/blob/31e43cbe5f01cdd5b5ab330ec3040920e8b61a91/Lib/enum.py#L1222-L1225
The same method for `Enum` has good coverage: https://github.com/python/cpython/blob/31e43cbe5f01cdd5b5ab330ec3040920e8b61a91/Lib/test/test_enum.py#L2278-L2325
I've added two simple test cases for `Flag` and `IntFlag` that check this.
----------
components: Tests
messages: 409717
nosy: sobolevn
priority: normal
severity: normal
status: open
title: Error path in `_missing_()` is not covered for `enum.Flag` and `enum.IntFlag`
type: behavior
versions: Python 3.11
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46262>
_______________________________________
More information about the New-bugs-announce
mailing list