We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4df0c9e commit a9d349aCopy full SHA for a9d349a
1 file changed
tests/strategies/test_tagged_unions.py
@@ -1,4 +1,4 @@
1
-from typing import Union
+from typing import Optional, Sequence, Union
2
3
from attrs import define
4
@@ -138,3 +138,15 @@ class B:
138
139
data = c.unstructure(A(), Union[A, B])
140
c.structure(data, Union[A, B])
141
+
142
143
+def test_nested_sequence_union():
144
+ @define
145
+ class Top:
146
+ u: Optional[Sequence[Union[A, B]]]
147
148
+ c = Converter()
149
+ configure_tagged_union(Union[A, B], c)
150
151
+ data = c.unstructure(Top(u=[B(a="")]), Top)
152
+ c.structure(data, Top)
0 commit comments