Closed shawnbrown closed 3 years ago
Squint objects are not being evaluated properly by datatest.validate() function:
datatest.validate()
import datatest import squint # Create a Select object. select = squint.Select([['A', 'B'], ['x', 1], ['y', 2], ['z', 3]]) # Compare data to itself--passes as expected. datatest.validate( select({'A': {'B'}}), select({'A': {'B'}}).fetch(), # <- Shouldn't be necessary. ) # Compare data to itself--fails, unexpectedly. datatest.validate( select({'A': {'B'}}), select({'A': {'B'}}), # <- Not properly handled! )
In the code above, the second call to datatest.validate() should pass but, instead, fails with the following message:
Traceback (most recent call last): File "<input>", line 3, in <module> select({'A': {'B'}}), # <- Not properly handled! File "~/datatest-project/datatest/validation.py", line 291, in __call__ raise err datatest.ValidationError: does not satisfy mapping requirements (3 differences): { 'x': [Invalid(1)], 'y': [Invalid(2)], 'z': [Invalid(3)], }
This bug is present in version 0.9.6 but has been fixed in 0.9.7.
Squint objects are not being evaluated properly by
datatest.validate()
function:In the code above, the second call to
datatest.validate()
should pass but, instead, fails with the following message: