========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================= test session starts ==========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
platform linux -- Python 3.10.12, pytest-9.0.3, pluggy-1.6.0
rootdir: /workspace/marshmallow
configfile: pyproject.toml
plugins: anyio-4.13.0, metadata-3.1.1, json-report-1.5.0, cov-7.1.0
collected 1229 items

tests/test_decorators.py ...............FF..F.F.....F.F......                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    [  2%]
tests/test_deserialization.py ................................................................F....................F.........................................................................................F.F................................................................................................................................................................................................                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 [ 33%]
tests/test_error_store.py .............................                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [ 35%]
tests/test_exceptions.py .......                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 [ 35%]
tests/test_fields.py ......................................................................................................................................................................                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [ 49%]
tests/test_options.py ..FF...........                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [ 50%]
tests/test_registry.py ..........                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [ 51%]
tests/test_schema.py ..................F....................FFFFFFF........F.............................F.................................F......FF.FF.FF.....F.F.........................F..................F.........................F...........................F......                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [ 71%]
tests/test_serialization.py ..............................F.........................................................................................................                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             [ 82%]
tests/test_utils.py ....................................                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         [ 85%]
tests/test_validate.py .................................................................................................................................................................................                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         [ 99%]
tests/test_version_attributes.py .                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               [100%]

=============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== FAILURES ===============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ TestValidatesSchemaDecorator.test_validator_nested_many_invalid_data ____________________________________________________________________________________________________________________________________________________________________________________________________<response clipped><NOTE>Due to the max output limit, only part of the full response has been shown to you.</NOTE>for <MySchema(many=False)>: OrderedSet(['foop', 'par']).") tblen=4>.value
___________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ TestFieldValidation.test_ignored_if_not_in_only ____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
tests/test_schema.py:1928: in test_ignored_if_not_in_only
    errors = s.validate({"b": "data"})
src/marshmallow/schema.py:469: in validate
    self._do_load(data, many=many, partial=partial, postprocess=False)
src/marshmallow/schema.py:491: in _do_load
    return _schema_do_load(self, data, many=many, partial=partial, unknown=unknown, postprocess=postprocess)
src/marshmallow/schema.py:664: in _schema_do_load
    _run_field_validators(self, result, error_store, many=many)
src/marshmallow/schema.py:611: in _run_field_validators
    raise ValueError(f'"{field_name}" field does not exist.')
E   ValueError: "a" field does not exist.
______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ TestNestedSchema.test_invalid_type_passed_to_nested_field _______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
tests/test_schema.py:2115: in test_invalid_type_passed_to_nested_field
    assert errors["inner"] == ["Invalid type."]
E   AssertionError: assert {'_schema': [...input type.']} == ['Invalid type.']
E
E     Use -v to get more diff
_______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ TestContext.test_function_field_raises_error_when_context_not_available ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
tests/test_schema.py:2482: in test_function_field_raises_error_when_context_not_available
    serializer.dump(owner)
src/marshmallow/schema.py:371: in dump
    return _schema_dump(self, obj, many=many)
src/marshmallow/schema.py:571: in _schema_dump
    result = self._serialize(obj, many=many)
src/marshmallow/schema.py:352: in _serialize
    return _schema_serialize(self, obj, many=many)
src/marshmallow/schema.py:816: in _schema_serialize2
    value = field.serialize(name, obj, accessor=self.get_attribute)
src/marshmallow/fields.py:179: in serialize
    return _field_serialize(self, attr, obj, accessor, **kwargs)
src/marshmallow/fields.py:1008: in _field_serialize
    return self._serialize(value, attr, obj, **kwargs)
src/marshmallow/fields.py:1718: in _func_ser3
    return self.serialize_func(obj, self.context)
tests/test_schema.py:2474: in <lambda>
    is_collab = fields.Function(lambda user, ctx: user in ctx["blog"])
E   KeyError: 'blog'
______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ TestFromDict.test_meta_options_are_applied ______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
tests/test_schema.py:2902: in test_meta_options_are_applied
    assert isinstance(dumped, OrderedDict)
E   AssertionError: assert False
E    +  where False = isinstance({'foo': 42}, OrderedDict)
_______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ TestFieldSerialization.test_decimal_field_special_values _______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
tests/test_serialization.py:365: in test_decimal_field_special_values
    assert m3s.is_qnan() and not m3s.is_signed()
E   AssertionError: assert (False)
E    +  where False = <built-in method is_qnan of decimal.Decimal object at 0x76ba63ff80a0>()
E    +    where <built-in method is_qnan of decimal.Decimal object at 0x76ba63ff80a0> = Decimal('-sNaN').is_qnan
======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================= short test summary info ========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
FAILED tests/test_decorators.py::TestValidatesSchemaDecorator::test_validator_nested_many_invalid_data - AssertionError: assert ['Invalid input type.'] == {'_schema': [...input type.']}
FAILED tests/test_decorators.py::TestValidatesSchemaDecorator::test_validator_nested_many_schema_error - AssertionError: assert ['This will never work.'] == {'_schema': [...never work.']}
FAILED tests/test_decorators.py::TestValidatesSchemaDecorator::test_validator_nested_many_pass_original_and_pass_many[False-expected_data1-expected_original_data1-data0] - TypeError: list indices must be integers or slices, not str
FAILED tests/test_decorators.py::TestValidatesSchemaDecorator::test_multiple_validators - AssertionError: assert '_schema' in ['bar must not be negative', 'Must be greater than 3']
FAILED tests/test_decorators.py::test_decorator_error_handling - AssertionError: assert 'foo' in {'_schema': {'bar': ['postloadmsg2', 'postloadmsg3'], 'foo': ['postloadmsg1']}}
FAILED tests/test_decorators.py::test_decorator_error_handling_with_load[post_load] - AssertionError: assert {'_schema': {'foo': 'error'}} == {'foo': 'error'}
FAILED tests/test_deserialization.py::TestFieldDeserialization::test_decimal_field_special_values - AssertionError: assert (False)
FAILED tests/test_deserialization.py::TestFieldDeserialization::test_field_toggle_show_invalid_value_in_error_message - KeyError: 'input'
FAILED tests/test_deserialization.py::TestFieldDeserialization::test_structured_dict_value_deserialization - AssertionError: assert {'ham': ['spam']} == {'foo': [], 'ham': ['spam']}
FAILED tests/test_deserialization.py::TestFieldDeserialization::test_structured_dict_key_value_deserialization - AssertionError: assert {1: {'key': [...id string.']}} == {1: {'key': [...id number.']}}
FAILED tests/test_options.py::TestFieldOrdering::test_ordered_option_is_inherited[False] - AssertionError: assert <class 'dict'> == OrderedDict
FAILED tests/test_options.py::TestFieldOrdering::test_ordered_option_is_inherited[True] - AssertionError: assert <class 'dict'> == OrderedDict
FAILED tests/test_schema.py::test_dumps_many - AssertionError: assert {'activation_...3-01-23', ...} == {'activation_...3-01-23', ...}
FAILED tests/test_schema.py::test_load_many_in_nested_invalid_input_type[False] - AssertionError: assert {'list1': ['N...nput type.']}} == {'list1': ['N...valid type.']}
FAILED tests/test_schema.py::test_load_many_in_nested_invalid_input_type[1] - AssertionError: assert {'list1': ['N...nput type.']}} == {'list1': ['N...valid type.']}
FAILED tests/test_schema.py::test_load_many_in_nested_invalid_input_type[1.2] - AssertionError: assert {'list1': ['N...nput type.']}} == {'list1': ['N...valid type.']}
FAILED tests/test_schema.py::test_load_many_in_nested_invalid_input_type[val3] - AssertionError: assert {'list1': ['N...nput type.']}} == {'list1': ['N...valid type.']}
FAILED tests/test_schema.py::test_load_many_in_nested_invalid_input_type[val4] - AssertionError: assert {'list1': ['N...nput type.']}} == {'list1': ['N...valid type.']}
FAILED tests/test_schema.py::test_load_many_in_nested_invalid_input_type[val5] - AssertionError: assert {'list1': ['N...nput type.']}} == {'list1': ['N...valid type.']}
FAILED tests/test_schema.py::test_load_many_in_nested_invalid_input_type[lol] - AssertionError: assert {'list1': ['N...nput type.']}} == {'list1': ['N...valid type.']}
FAILED tests/test_schema.py::test_nested_on_bind_field_hook - KeyError: 'fname'
FAILED tests/test_schema.py::test_fields_must_be_declared_as_instances - Failed: DID NOT RAISE <class 'TypeError'>
FAILED tests/test_schema.py::test_nested_instance_many - AssertionError: assert {} == [{'id': 1, 't...Second book'}]
FAILED tests/test_schema.py::test_data_key_collision[f1] - Failed: DID NOT RAISE <class 'ValueError'>
FAILED tests/test_schema.py::test_data_key_collision[f5] - Failed: DID NOT RAISE <class 'ValueError'>
FAILED tests/test_schema.py::test_attribute_collision[f1] - Failed: DID NOT RAISE <class 'ValueError'>
FAILED tests/test_schema.py::test_attribute_collision[f5] - Failed: DID NOT RAISE <class 'ValueError'>
FAILED tests/test_schema.py::TestDeeplyNestedLoadOnly::test_load_only - AssertionError: assert 'str_load_only' not in {'str_dump_only': 'Dump Only', 'str_load_only': 'Load Only', 'str_regular': 'Regular String'}
FAILED tests/test_schema.py::TestDeeplyNestedLoadOnly::test_dump_only - AssertionError: assert 'str_dump_only' not in {'str_dump_only': 'Dump Only', 'str_load_only': 'Load Only', 'str_regular': 'Regular String'}
FAILED tests/test_schema.py::test_invalid_only_and_exclude_with_fields - assert 'ban' in "Invalid fields for <MySchema(many=False)>: OrderedSet(['foo', 'par'])."
FAILED tests/test_schema.py::test_invalid_only_and_exclude_with_additional - assert 'ban' in "Invalid fields for <MySchema(many=False)>: OrderedSet(['foop', 'par'])."
FAILED tests/test_schema.py::TestFieldValidation::test_ignored_if_not_in_only - ValueError: "a" field does not exist.
FAILED tests/test_schema.py::TestNestedSchema::test_invalid_type_passed_to_nested_field - AssertionError: assert {'_schema': [...input type.']} == ['Invalid type.']
FAILED tests/test_schema.py::TestContext::test_function_field_raises_error_when_context_not_available - KeyError: 'blog'
FAILED tests/test_schema.py::TestFromDict::test_meta_options_are_applied - AssertionError: assert False
FAILED tests/test_serialization.py::TestFieldSerialization::test_decimal_field_special_values - AssertionError: assert (False)
=================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== 36 failed, 1193 passed in 2.38s ====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================
[The command completed with exit code 1.]
[Current working directory: /workspace/marshmallow]
[Python interpreter: /usr/bin/python]
[Command finished with exit code 1]