forked from mindspore-Ecosystem/mindspore
!49820 Modify testcase
Merge pull request !49820 from huangbingjian/fix_testcase
This commit is contained in:
commit
b0284bb358
|
@ -269,7 +269,7 @@ def test_print_validate_tuple():
|
||||||
|
|
||||||
|
|
||||||
@security_off_wrap
|
@security_off_wrap
|
||||||
@pytest.mark.level1
|
@pytest.mark.level0
|
||||||
@pytest.mark.env_onecard
|
@pytest.mark.env_onecard
|
||||||
@pytest.mark.platform_arm_ascend_training
|
@pytest.mark.platform_arm_ascend_training
|
||||||
@pytest.mark.platform_x86_ascend_training
|
@pytest.mark.platform_x86_ascend_training
|
||||||
|
@ -287,10 +287,8 @@ def test_print_validate():
|
||||||
print("np_sum: ", np_sum)
|
print("np_sum: ", np_sum)
|
||||||
return np_sum
|
return np_sum
|
||||||
|
|
||||||
with pytest.raises(RuntimeError) as err:
|
|
||||||
res = print_func()
|
res = print_func()
|
||||||
print("res: ", res)
|
assert (res == [2, 4, 6, 8, 10]).all()
|
||||||
assert "Should not use Python object in runtime" in str(err.value)
|
|
||||||
|
|
||||||
|
|
||||||
@security_off_wrap
|
@security_off_wrap
|
||||||
|
|
Loading…
Reference in New Issue