We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ec9dfb5 commit 63d40e3Copy full SHA for 63d40e3
1 file changed
unittests/test_builtins.py
@@ -121,6 +121,27 @@ async def map_op(value: int) -> int:
121
)
122
123
124
+@pytest.mark.parametrize(
125
+ "itrs",
126
+ [
127
+ (range(4), range(5), range(5)),
128
+ (range(5), range(4), range(5)),
129
+ (range(5), range(5), range(4)),
130
+ ],
131
+)
132
+@sync
133
+async def test_map_strict_unequal(itrs: "tuple[range, ...]"):
134
+ def triple_sum(x: int, y: int, z: int) -> int:
135
+ return x + y + z
136
+ # no error without strict
137
+ async for _ in a.map(triple_sum, *itrs):
138
+ pass
139
+ # error with strict
140
+ with pytest.raises(ValueError):
141
+ async for _ in a.map(triple_sum, *itrs, strict=True):
142
143
+
144
145
@sync
146
async def test_map_aa():
147
async def map_op(value: int) -> int:
0 commit comments