!49820 Modify testcase

Merge pull request !49820 from huangbingjian/fix_testcase
This commit is contained in:
i-robot 2023-03-06 08:57:52 +00:00 committed by Gitee
commit b0284bb358
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 3 additions and 5 deletions

View File

@ -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