Skip to content

Commit acae31e

Browse files
committed
Reduce number of Second tests
1 parent d2495f7 commit acae31e

File tree

1 file changed

+5
-24
lines changed

1 file changed

+5
-24
lines changed

tests/tensor/test_basic.py

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -191,42 +191,23 @@ def _numpy_second(x, y):
191191
name="SecondBroadcastTester",
192192
op=second,
193193
expected=_numpy_second,
194-
good=dict(
195-
itertools.chain(
196-
multi_dtype_checks((4, 5), (5,)),
197-
multi_dtype_checks((2, 3, 2), (3, 2)),
198-
multi_dtype_checks((2, 3, 2), (2,)),
199-
)
200-
),
201-
# I can't think of any way to make this fail at build time
202-
# Just some simple smoke tests
194+
good=dict(multi_dtype_checks((4, 2, 3, 2), (3, 2))),
203195
bad_runtime=dict(
204196
fail1=(random(5, 4), random(5)),
205197
fail2=(random(3, 2, 3), random(6, 9)),
206198
fail3=(integers(6, 2, 9), random(3, 2)),
207199
),
208200
)
209201

210-
# We exclude local_fill_to_alloc because it optimizes the "second" node
211-
# away from the graph.
202+
# We exclude local_fill_to_alloc because it optimizes the "second" node away from the graph.
212203
TestSecondSameRank = makeTester(
213204
name="SecondSameRankTester",
214205
op=second,
215206
expected=_numpy_second,
216-
good=dict(
217-
itertools.chain(
218-
multi_dtype_checks((4, 5), (4, 5)),
219-
multi_dtype_checks((1, 2), (3, 2)),
220-
multi_dtype_checks((3, 2), (1, 2)),
221-
)
222-
),
223-
# These sizes are not broadcastable to one another
224-
# and SHOULD raise an error, but currently don't.
207+
good=dict(multi_dtype_checks((4, 5), (4, 1))),
225208
bad_runtime=dict(
226-
itertools.chain(
227-
multi_dtype_checks((4, 5), (5, 4)),
228-
multi_dtype_checks((1, 5), (5, 4)),
229-
)
209+
fail1=(random(4, 5), random(5, 4)),
210+
fail2=(integers(1, 5), integers(5, 4)),
230211
),
231212
mode=get_default_mode().excluding("local_fill_to_alloc", "local_useless_fill"),
232213
)

0 commit comments

Comments
 (0)