[New-bugs-announce] [issue46262] Error path in `_missing_()` is not covered for `enum.Flag` and `enum.IntFlag`
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.
title: Error path in `_missing_()` is not covered for `enum.Flag` and `enum.IntFlag`
versions: Python 3.11
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce