Closed brandonpayton closed 10 months ago
This width_tuple
function looks quite simple. Do you mind adding some tests to tests/utils/test_configobj.py
? Preferably also for the error handling that you improved (i.e. asserting that the right exceptions are thrown).
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.
That is much cleaner. Thank you!
Thank you for your contribution :+1:
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.