From b7f74030c301b0a5a786d566191f0b08dcd4fde7 Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Fri, 13 Jan 2023 08:27:07 -0600 Subject: [PATCH] Use default_factory in tests --- tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 955bbb1..71c1eae 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -68,7 +68,7 @@ class Bar(JsonSchemaMixin): class Baz(JsonSchemaMixin): """Type with nested default value""" - a: Point = field(default=Point(0.0, 0.0)) + a: Point = field(default_factory=lambda: Point(0.0, 0.0)) @dataclass