FIx the incorrect expected exception type (#5396)
This commit is contained in:
parent
3a8eaaaef1
commit
31b161097d
@ -56,8 +56,6 @@ xfail_issue_35912 = xfail_test(reason="RuntimeError: Error of validate layer: B
|
|||||||
xfail_issue_35923 = xfail_test(reason="RuntimeError: PReLU without weights is not supported")
|
xfail_issue_35923 = xfail_test(reason="RuntimeError: PReLU without weights is not supported")
|
||||||
xfail_issue_35925 = xfail_test(reason="Assertion error - reduction ops results mismatch")
|
xfail_issue_35925 = xfail_test(reason="Assertion error - reduction ops results mismatch")
|
||||||
xfail_issue_35927 = xfail_test(reason="RuntimeError: B has zero dimension that is not allowable")
|
xfail_issue_35927 = xfail_test(reason="RuntimeError: B has zero dimension that is not allowable")
|
||||||
xfail_issue_35930 = xfail_test(reason="onnx.onnx_cpp2py_export.checker.ValidationError: "
|
|
||||||
"Required attribute 'to' is missing.")
|
|
||||||
xfail_issue_36480 = xfail_test(reason="RuntimeError: [NOT_FOUND] Unsupported property dummy_option "
|
xfail_issue_36480 = xfail_test(reason="RuntimeError: [NOT_FOUND] Unsupported property dummy_option "
|
||||||
"by CPU plugin")
|
"by CPU plugin")
|
||||||
xfail_issue_36485 = xfail_test(reason="RuntimeError: Check 'm_group >= 1' failed at "
|
xfail_issue_36485 = xfail_test(reason="RuntimeError: Check 'm_group >= 1' failed at "
|
||||||
|
@ -10,7 +10,6 @@ from onnx.helper import make_graph, make_model, make_node, make_tensor_value_inf
|
|||||||
from ngraph.exceptions import NgraphTypeError
|
from ngraph.exceptions import NgraphTypeError
|
||||||
from tests.runtime import get_runtime
|
from tests.runtime import get_runtime
|
||||||
from tests.test_onnx.utils import get_node_model, import_onnx_model, run_model, run_node
|
from tests.test_onnx.utils import get_node_model, import_onnx_model, run_model, run_node
|
||||||
from tests import xfail_issue_35930
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
@ -378,8 +377,9 @@ def test_cast_to_uint(val_type):
|
|||||||
assert np.allclose(result, expected)
|
assert np.allclose(result, expected)
|
||||||
|
|
||||||
|
|
||||||
@xfail_issue_35930
|
|
||||||
def test_cast_errors():
|
def test_cast_errors():
|
||||||
|
from onnx.onnx_cpp2py_export.checker import ValidationError
|
||||||
|
|
||||||
np.random.seed(133391)
|
np.random.seed(133391)
|
||||||
input_data = np.ceil(np.random.rand(2, 3, 4) * 16)
|
input_data = np.ceil(np.random.rand(2, 3, 4) * 16)
|
||||||
|
|
||||||
@ -396,7 +396,7 @@ def test_cast_errors():
|
|||||||
|
|
||||||
graph = make_graph([node], "compute_graph", input_tensors, output_tensors)
|
graph = make_graph([node], "compute_graph", input_tensors, output_tensors)
|
||||||
model = make_model(graph, producer_name="NgraphBackend")
|
model = make_model(graph, producer_name="NgraphBackend")
|
||||||
with pytest.raises(RuntimeError):
|
with pytest.raises(ValidationError):
|
||||||
import_onnx_model(model)
|
import_onnx_model(model)
|
||||||
|
|
||||||
# unsupported data type representation
|
# unsupported data type representation
|
||||||
@ -412,7 +412,7 @@ def test_cast_errors():
|
|||||||
|
|
||||||
graph = make_graph([node], "compute_graph", input_tensors, output_tensors)
|
graph = make_graph([node], "compute_graph", input_tensors, output_tensors)
|
||||||
model = make_model(graph, producer_name="NgraphBackend")
|
model = make_model(graph, producer_name="NgraphBackend")
|
||||||
with pytest.raises(RuntimeError):
|
with pytest.raises(ValidationError):
|
||||||
import_onnx_model(model)
|
import_onnx_model(model)
|
||||||
|
|
||||||
# unsupported input tensor data type:
|
# unsupported input tensor data type:
|
||||||
|
Loading…
Reference in New Issue
Block a user