Open arnaud-soulard opened 1 year ago
Just to confirm I correctly got your point. When you say "The test fails 1 over 3-4 times." you mean it fails every 3 to 4 times you run it, presumably because exception_info.value.errors[0]
sometimes contains "required key not provided @ data['value1']" and sometimes ""required key not provided @ data['value2']"?
exactly, it is related to the order
When validating this schema:
With this test:
The test fails 1 over 3-4 times. I found it is related to the use of a set, that is unordered in python in schema_builder.py
Current code:
My proposal (that works for me) would be to use a dict instead of a set (to preserve validations errors order):