Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for test_encode_unsupported (0.28 sec)

  1. tests/test_jsonable_encoder.py

        assert jsonable_encoder(item, exclude={"count"}) == {"name": "foo"}
        assert jsonable_encoder(item, include={}) == {}
        assert jsonable_encoder(item, exclude={}) == {"name": "foo", "count": 100}
    
    
    def test_encode_unsupported():
        unserializable = Unserializable()
        with pytest.raises(ValueError):
            jsonable_encoder(unserializable)
    
    
    @needs_pydanticv2
    def test_encode_custom_json_encoders_model_pydanticv2():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 9K bytes
    - Viewed (0)
Back to top