Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
tybug committed Dec 15, 2023
1 parent afe9dca commit 85021de
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hypothesis-python/tests/cover/test_searchstrategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 85021de

Please sign in to comment.