Skip to content

Failing test_canonicalises_to_equivalent_fixpoint #64

Open
@Stranger6667

Description

@Stranger6667

Currently the test_canonicalises_to_equivalent_fixpoint test fails on assert cc == canonicalish(cc) with the following schema:

schema = {'not': {'anyOf': [{'type': 'number'}, {'if': {'type': 'null'}, 'then': {'type': 'null'}, 'else': {}}]}}

As far as I see, calling canonicalise second time should not transform the schema again. But here is schema after the first call:

{
    "not": {"anyOf": [{"const": None}, {"not": {"const": None}}]},
    "type": ["null", "boolean", "string", "array", "object"],
}

and after the second call:

{
    "not": {
        "anyOf": [
            {"const": None},
            {
                "type": ["null", "boolean", "string", "array", "object"],
                "not": {"const": None},
            },
        ]
    },
    "type": ["null", "boolean", "string", "array", "object"],
}

git bisect gave me this commit - afc292b

Should the second call leave the input schema as is?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions