test(General): write test for pydantic serializer, fixed serialization bug
Unit test coverage / pytest (push) Failing after 3h11m8s

This commit write unit tests for pydantic serializer using cursor ai, and found an issue related to serialization. Originally, the code uses comma to concat string, but map and list also has comma inside. During the deserialization, split using comma will break map and list, leaving `{` with first kv pair for map, and `[` with first element with list. Instead of using concat with comma as separator, I use json to encode the object dict.
This commit is contained in:
2025-05-12 16:42:34 +08:00
parent bc98351493
commit 45357c42a8
3 changed files with 173 additions and 98 deletions
+2 -1
View File
@@ -49,5 +49,6 @@ dev = [
"black",
"isort",
"flake8",
"pre-commit"
"pre-commit",
"pylint"
]