-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Failing test_canonicalises_to_equivalent_fixpoint #64
Comments
Hmm. This schema should in fact canonicalise to It would also be nice to express that In the process, we should overhaul our corpus-based tests: keep the valid and invalid inputs for the test suite schemas and check that their status doesn't change by canonicalising. We might want to do this with submodules, given the size of the schemastore corpus (see https://github.com/Zac-HD/hypothesis-jsonschema/compare/catalog-update). |
A simpler example - consider the three schemas A, B, and C: A = {'not': {'anyOf': [{'type': 'number'}, {'type': 'integer'}]}}
B = {'type': ['null', 'boolean', 'string', 'array', 'object'], 'not': {'type': 'integer'}}
C = {'type': ['null', 'boolean', 'string', 'array', 'object']} C is the canonical form. B canonicalises to C, correctly. However A canonicalises to B, instead of directly to C! |
Currently the
test_canonicalises_to_equivalent_fixpoint
test fails onassert cc == canonicalish(cc)
with the following schema:As far as I see, calling
canonicalise
second time should not transform the schema again. But here is schema after the first call:and after the second call:
git bisect
gave me this commit - afc292bShould the second call leave the input schema as is?
The text was updated successfully, but these errors were encountered: