Skip to content

bpo-46262: cover error path in enum.Flag._missing_ - #30408

Merged
ethanfurman merged 3 commits into
python:mainfrom
sobolevn:issue-46262
Jan 5, 2022
Merged

bpo-46262: cover error path in enum.Flag._missing_#30408
ethanfurman merged 3 commits into
python:mainfrom
sobolevn:issue-46262

Conversation

@sobolevn

@sobolevn sobolevn commented Jan 4, 2022

Copy link
Copy Markdown
Member

This path is now covered:

cpython/Lib/enum.py

Lines 1222 to 1225 in 31e43cb

if not isinstance(value, int):
raise ValueError(
"%r is not a valid %s" % (value, cls.__qualname__)
)

https://bugs.python.org/issue46262

Comment thread Misc/NEWS.d/next/Tests/2022-01-05-01-38-45.bpo-46262.MhiLWP.rst Outdated
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
@sobolevn

sobolevn commented Jan 5, 2022

Copy link
Copy Markdown
Member Author

Thanks everyone!

P.S. @ethanfurman would you be so kind to also review one more my enum.py PR? #30357 🙂

(I've also found several other untested features, so new PRs are incoming) 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants