Conversation
if v returns ValueError when not passing in default python iterable type. Using any() provides cross iterable object compatibility.
Codecov Report
@@ Coverage Diff @@
## master #125 +/- ##
=======================================
Coverage 46.67% 46.67%
=======================================
Files 4 4
Lines 632 632
Branches 64 64
=======================================
Hits 295 295
- Misses 322 324 +2
+ Partials 15 13 -2
Continue to review full report at Codecov.
|
|
Thanks. I refactored this together with the help of @GriceTurrble #65, also we have good test coverage for this part. If i remember correct the value should never be any type of a python iterable. See the next line where we check this: if isinstance(value, (dict, list, set, tuple)):
message = 'expected string or datetime datatype, got {},'\
'for key {} and value {}'.format(
type(value), key, str(value))
raise MWSError(message)First i thought i should test with duck typing but this is clearer. |
if v returns ValueError when not passing in default python iterable type. Using any() provides cross iterable object compatibility.