Skip to content

Commit

Permalink
Improve tagged_union coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinche committed Dec 2, 2024
1 parent 2f464b9 commit 2eedc81
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/strategies/test_tagged_unions.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,10 @@ class B:
configure_tagged_union(Union[A, B], c, default=A)

data = c.unstructure(A(), Union[A, B])
c.structure(data, Union[A, B])
assert c.structure(data, Union[A, B]) == A()

data.pop("_type")
assert c.structure(data, Union[A, B]) == A()


def test_nested_sequence_union():
Expand Down

0 comments on commit 2eedc81

Please sign in to comment.