From: Irfanuddin Shafi Ahmed Date: Wed, 2 Aug 2023 15:28:34 +0000 (+0530) Subject: ✅ Fix test error in Windows for `jsonable_encoder` (#9840) X-Git-Tag: 0.101.0~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37818f553ddb21b7adaaf16d18b95f9710065ad4;p=thirdparty%2Ffastapi%2Ffastapi.git ✅ Fix test error in Windows for `jsonable_encoder` (#9840) Co-authored-by: Marcelo Trylesinski --- diff --git a/tests/test_jsonable_encoder.py b/tests/test_jsonable_encoder.py index ff3033ecdf..7c8338ff37 100644 --- a/tests/test_jsonable_encoder.py +++ b/tests/test_jsonable_encoder.py @@ -247,8 +247,9 @@ def test_encode_model_with_pure_path(): class Config: arbitrary_types_allowed = True - obj = ModelWithPath(path=PurePath("/foo", "bar")) - assert jsonable_encoder(obj) == {"path": "/foo/bar"} + test_path = PurePath("/foo", "bar") + obj = ModelWithPath(path=test_path) + assert jsonable_encoder(obj) == {"path": str(test_path)} def test_encode_model_with_pure_posix_path():