forked from mindspore-Ecosystem/mindspore
change error type
This commit is contained in:
parent
ff57caceb9
commit
8963e39516
|
@ -228,10 +228,10 @@ def test_exec():
|
|||
|
||||
raise_set = [
|
||||
('Squeeze_1_Error', {
|
||||
'block': (lambda x: P.Squeeze(axis=1.2), {'exception': ValueError}),
|
||||
'block': (lambda x: P.Squeeze(axis=1.2), {'exception': TypeError}),
|
||||
'desc_inputs': [Tensor(np.ones(shape=[3, 1, 5]))]}),
|
||||
('Squeeze_2_Error', {
|
||||
'block': (lambda x: P.Squeeze(axis=((1.2, 1.3))), {'exception': ValueError}),
|
||||
'block': (lambda x: P.Squeeze(axis=((1.2, 1.3))), {'exception': TypeError}),
|
||||
'desc_inputs': [Tensor(np.ones(shape=[3, 1, 5]))]}),
|
||||
('ReduceSum_Error', {
|
||||
'block': (lambda x: P.ReduceSum(keep_dims=1), {'exception': TypeError}),
|
||||
|
|
|
@ -401,16 +401,16 @@ def test_exec():
|
|||
|
||||
raise_set = [
|
||||
('StridedSlice_1_Error', {
|
||||
'block': (lambda x: P.StridedSlice(begin_mask="1"), {'exception': ValueError}),
|
||||
'block': (lambda x: P.StridedSlice(begin_mask="1"), {'exception': TypeError}),
|
||||
'desc_inputs': [0]}),
|
||||
('StridedSlice_2_Error', {
|
||||
'block': (lambda x: P.StridedSlice(end_mask="1"), {'exception': ValueError}),
|
||||
'block': (lambda x: P.StridedSlice(end_mask="1"), {'exception': TypeError}),
|
||||
'desc_inputs': [0]}),
|
||||
('StridedSlice_3_Error', {
|
||||
'block': (lambda x: P.StridedSlice(ellipsis_mask=1.1), {'exception': ValueError}),
|
||||
'block': (lambda x: P.StridedSlice(ellipsis_mask=1.1), {'exception': TypeError}),
|
||||
'desc_inputs': [0]}),
|
||||
('StridedSlice_4_Error', {
|
||||
'block': (lambda x: P.StridedSlice(new_axis_mask="1.1"), {'exception': ValueError}),
|
||||
'block': (lambda x: P.StridedSlice(new_axis_mask="1.1"), {'exception': TypeError}),
|
||||
'desc_inputs': [0]}),
|
||||
]
|
||||
|
||||
|
|
Loading…
Reference in New Issue