New submission from Nikita Sobolev <m...@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 <rep...@bugs.python.org> <https://bugs.python.org/issue46262> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com