✅ Fix test error in Windows for jsonable_encoder (#9840)

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
This commit is contained in:
Irfanuddin Shafi AhmedandMarcelo Trylesinski authored and GitHub committed 2023-08-02 17:28:34 +02:00
1 parent 2d8a776836
commit 37818f553d
1 file changed
+3 -2
+3 -2
View File
@@ -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():