From c939c70f0d0fb0d48e2890559d706d228610d052 Mon Sep 17 00:00:00 2001 From: Anastasia Kuporosova Date: Thu, 19 Jan 2023 22:23:50 +0100 Subject: [PATCH] [PyOV] Skip tests with bool for arm (#15208) (#15214) * [PyOV] Skip tests with bool for arm * exec_net export test rewrite --- .../python/tests/test_runtime/test_infer_request.py | 6 +++++- src/bindings/python/tests/test_runtime/test_properties.py | 3 --- .../test_inference_engine/test_ExecutableNetwork.py | 7 ++++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/bindings/python/tests/test_runtime/test_infer_request.py b/src/bindings/python/tests/test_runtime/test_infer_request.py index 54fcc9311d8..0e88d5e4994 100644 --- a/src/bindings/python/tests/test_runtime/test_infer_request.py +++ b/src/bindings/python/tests/test_runtime/test_infer_request.py @@ -50,6 +50,11 @@ def create_simple_request_and_inputs(device): def concat_model_with_data(device, ov_type, numpy_dtype): + core = Core() + # todo: remove as 101726 will be fixed. + if ov_type == Type.boolean and device == "CPU" and "Intel" not in core.get_property(device, "FULL_DEVICE_NAME"): + pytest.skip("This test runs only on openvino intel cpu plugin") + input_shape = [5] params = [] @@ -60,7 +65,6 @@ def concat_model_with_data(device, ov_type, numpy_dtype): params += [ops.parameter(input_shape, numpy_dtype)] model = Model(ops.concat(params, 0), params) - core = Core() compiled_model = core.compile_model(model, device) request = compiled_model.create_infer_request() tensor1 = Tensor(ov_type, input_shape) diff --git a/src/bindings/python/tests/test_runtime/test_properties.py b/src/bindings/python/tests/test_runtime/test_properties.py index 2a80472fa5c..3c7fc9a0d04 100644 --- a/src/bindings/python/tests/test_runtime/test_properties.py +++ b/src/bindings/python/tests/test_runtime/test_properties.py @@ -276,9 +276,6 @@ def test_properties_hint_model(): def test_single_property_setting(device): core = Core() - if device == "CPU" and "Intel" not in core.get_property(device, "FULL_DEVICE_NAME"): - pytest.skip("This test runs only on openvino intel cpu plugin") - core.set_property(device, properties.streams.num(properties.streams.Num.AUTO)) assert properties.streams.Num.AUTO.to_integer() == -1 diff --git a/src/bindings/python/tests_compatibility/test_inference_engine/test_ExecutableNetwork.py b/src/bindings/python/tests_compatibility/test_inference_engine/test_ExecutableNetwork.py index 1ae91e485f1..9efb1d23ef4 100644 --- a/src/bindings/python/tests_compatibility/test_inference_engine/test_ExecutableNetwork.py +++ b/src/bindings/python/tests_compatibility/test_inference_engine/test_ExecutableNetwork.py @@ -223,10 +223,11 @@ def test_exec_graph(device): del ie_core -@pytest.mark.skipif(os.environ.get("TEST_DEVICE", "CPU") != "MYRIAD", - reason="Device specific test. Only MYRIAD plugin implements network export") -def test_export_import(): +def test_export_import(device): ie_core = ie.IECore() + if "EXPORT_IMPORT" not in ie_core.get_metric(device, "OPTIMIZATION_CAPABILITIES"): + pytest.skip(f"{ie_core.get_metric(device, 'FULL_DEVICE_NAME')} plugin due-to export, import model API isn't implemented.") + net = ie_core.read_network(model=test_net_xml, weights=test_net_bin) exec_net = ie_core.load_network(net, "MYRIAD") exported_net_file = 'exported_model.bin'