From 37818f553ddb21b7adaaf16d18b95f9710065ad4 Mon Sep 17 00:00:00 2001 From: Irfanuddin Shafi Ahmed Date: Wed, 2 Aug 2023 20:58:34 +0530 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Fix=20test=20error=20in=20Windows?= =?UTF-8?q?=20for=20`jsonable=5Fencoder`=20(#9840)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marcelo Trylesinski --- tests/test_jsonable_encoder.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_jsonable_encoder.py b/tests/test_jsonable_encoder.py index ff3033ecd..7c8338ff3 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():