-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix configobj to relay tuple type errors #1633
Fix configobj to relay tuple type errors #1633
Conversation
This |
I committed some tests but need to break them into smaller pieces and add one or two more. |
Thanks also for taking a look at this. |
OK, I added some width_tuple tests, made the raised exceptions more precise, and consolidated the exception handling. This should be ready for another look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code itself looks good. I suggest breaking the test cases up into individual functions so that each function checks exactly "one thing".
Co-authored-by: Lucas Hoffmann <lucc@users.noreply.github.com>
That is much cleaner. Thank you! |
Thank you for your contribution 👍 |
Some current config tuple checking is of the form:
This has two problems. The first is that
isinstance('123', int)
is alwaysFalse
, which means the if's block always runs. AVdtTypeError
would always be raised except that theraise
keyword is missing.This PR attempts to fix that issue.