diff --git a/hypothesis-python/tests/cover/test_searchstrategy.py b/hypothesis-python/tests/cover/test_searchstrategy.py index 9a8f678ea5..b0f49c2520 100644 --- a/hypothesis-python/tests/cover/test_searchstrategy.py +++ b/hypothesis-python/tests/cover/test_searchstrategy.py @@ -98,19 +98,23 @@ def test_jsonable(): class HasDefaultDict: x: defaultdict + @attr.s class AttrsClass: n = attr.ib() + def test_jsonable_defaultdict(): obj = HasDefaultDict(defaultdict(list)) obj.x["a"] = [42] assert to_jsonable(obj) == {"x": {"a": [42]}} + def test_jsonable_attrs(): obj = AttrsClass(n=10) assert to_jsonable(obj) == {"n": 10} + def test_jsonable_namedtuple(): Obj = namedtuple("Obj", ("x")) obj = Obj(10)