!48193 fix testcase for Randperm

Merge pull request !48193 from liyuxia/master
This commit is contained in:
i-robot 2023-01-31 02:47:52 +00:00 committed by Gitee
commit d9ccbccf45
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 2 additions and 2 deletions

View File

@ -103,6 +103,6 @@ def test_randperm_uint64():
@pytest.mark.platform_x86_gpu_training
@pytest.mark.env_onecard
def test_randperm_n_too_large():
with pytest.raises(RuntimeError) as info:
with pytest.raises(ValueError) as info:
randperm(1, 0, mindspore.int32, 2)
assert "n (2) cannot exceed max_length_ (1)" in str(info.value)
assert "For 'Randperm', input 'n' (2) cannot exceed 'max_length' (1)." in str(info.value)