You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Debian, the jsonschema package was now updated to 4.19.2, and this causes two asdf-standard tests to fail:
_____________________ test_nested_object_validation[path0] _____________________
path = PosixPath('/usr/lib/python3/dist-packages/asdf_standard/resources/schemas/stsci.edu/asdf/asdf-schema-1.0.0.yaml')
create_validator = <function create_validator.<locals>._create_validator at 0x7f060fec0720>
@pytest.mark.parametrize("path", SCHEMAS_PATH.glob("asdf-schema-*.yaml"))
def test_nested_object_validation(path, create_validator):
"""
Test that the validations are applied to nested objects.
"""
metaschema = load_yaml(path)
validator = create_validator(metaschema)
schema = {"$schema": metaschema["id"], "type": "object", "properties": {"foo": {"datatype": "float32"}}}
# No error here
validator.validate(schema)
schema = {"$schema": metaschema["id"], "type": "object", "properties": {"foo": {"datatype": "banana"}}}
> with pytest.raises(ValidationError, match="'banana' is not valid"):
E Failed: DID NOT RAISE <class 'jsonschema.exceptions.ValidationError'>
../build.N1i/src/tests/test_asdf_schema.py:27: Failed
and
_____________________ test_nested_object_validation[path0] _____________________
path = PosixPath('/usr/lib/python3/dist-packages/asdf_standard/resources/schemas/stsci.edu/yaml-schema/draft-01.yaml')
create_validator = <function create_validator.<locals>._create_validator at 0x7f060fec0720>
@pytest.mark.parametrize("path", YAML_SCHEMA_PATH.glob("*.yaml"))
def test_nested_object_validation(path, create_validator):
"""
Test that the validations are applied to nested objects.
"""
metaschema = load_yaml(path)
validator = create_validator(metaschema)
schema = {"$schema": metaschema["id"], "type": "object", "properties": {"foo": {"flowStyle": "block"}}}
# No error here
validator.validate(schema)
schema = {"$schema": metaschema["id"], "type": "object", "properties": {"foo": {"flowStyle": "funky"}}}
> with pytest.raises(ValidationError, match="'funky' is not one of"):
E Failed: DID NOT RAISE <class 'jsonschema.exceptions.ValidationError'>
../build.N1i/src/tests/test_yaml_schema.py:27: Failed
In both cases the with pytest.raises(…) lines just below the reported lines would also fail; it seems that the ValidationError is not raised anymore in all these cases.
This is known to to be the case as more recent versions of jsonschema dropped support for features required here (and have not re-added those features). There is an upper pin for jsonschema in the test requirements in pyproject.toml to account for this:
As the upper pin is only for test requirements (jsonschema is not required to install asdf-standard) can the older version be installed during testing of the debian package (to match what is done here for the packages released on pypi)?
In Debian, the jsonschema package was now updated to 4.19.2, and this causes two asdf-standard tests to fail:
and
In both cases the
with pytest.raises(…)
lines just below the reported lines would also fail; it seems that the ValidationError is not raised anymore in all these cases.Full test log here. This is also reported as Debian#1064275.
The text was updated successfully, but these errors were encountered: