Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for test_encode_pure_path (0.25 seconds)

  1. tests/test_jsonable_encoder.py

            model_config = {"arbitrary_types_allowed": True}
    
        obj = ModelWithPath(path=PureWindowsPath("/foo", "bar"))
        assert jsonable_encoder(obj) == {"path": "\\foo\\bar"}
    
    
    def test_encode_pure_path():
        test_path = PurePath("/foo", "bar")
    
        assert jsonable_encoder({"path": test_path}) == {"path": str(test_path)}
    
    
    def test_decimal_encoder_float():
        data = {"value": Decimal(1.23)}
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 9.2K bytes
    - Click Count (0)
Back to Top