From 757b1f0d9e417b70cfa1dd5fac3a425d21915800 Mon Sep 17 00:00:00 2001 From: Jan Iwaszkiewicz Date: Tue, 1 Sep 2020 15:11:58 +0200 Subject: [PATCH] [nGraph] Python tests - move to int32 (#1966) --- ngraph/python/tests/test_ngraph/test_basic.py | 19 ++- .../python/tests/test_ngraph/test_data_movement.py | 17 ++- .../python/tests/test_ngraph/test_normalization.py | 17 ++- ngraph/python/tests/test_ngraph/test_ops_binary.py | 6 +- .../python/tests/test_ngraph/test_ops_reshape.py | 110 +++++++++-------- ngraph/python/tests/test_ngraph/test_ops_unary.py | 95 +-------------- ngraph/python/tests/test_ngraph/test_reduction.py | 52 ++++---- ngraph/python/tests/test_onnx/test_ops_reshape.py | 131 +++++++++++++++------ ngraph/python/tests/test_onnx/test_ops_unary.py | 17 ++- ngraph/python/tests/test_onnx/test_ops_variadic.py | 27 +++-- 10 files changed, 234 insertions(+), 257 deletions(-) diff --git a/ngraph/python/tests/test_ngraph/test_basic.py b/ngraph/python/tests/test_ngraph/test_basic.py index 3dcba2b..a86355c 100644 --- a/ngraph/python/tests/test_ngraph/test_basic.py +++ b/ngraph/python/tests/test_ngraph/test_basic.py @@ -119,9 +119,8 @@ def test_serialization(): pass -@xfail_issue_34323 def test_broadcast_1(): - input_data = np.array([1, 2, 3]) + input_data = np.array([1, 2, 3], dtype=np.int32) new_shape = [3, 3] expected = [[1, 2, 3], [1, 2, 3], [1, 2, 3]] @@ -129,18 +128,16 @@ def test_broadcast_1(): assert np.allclose(result, expected) -@xfail_issue_34323 def test_broadcast_2(): - input_data = np.arange(4) + input_data = np.arange(4, dtype=np.int32) new_shape = [3, 4, 2, 4] expected = np.broadcast_to(input_data, new_shape) result = run_op_node([input_data], ng.broadcast, new_shape) assert np.allclose(result, expected) -@xfail_issue_34323 def test_broadcast_3(): - input_data = np.array([1, 2, 3]) + input_data = np.array([1, 2, 3], dtype=np.int32) new_shape = [3, 3] axis_mapping = [0] expected = [[1, 1, 1], [2, 2, 2], [3, 3, 3]] @@ -149,10 +146,10 @@ def test_broadcast_3(): assert np.allclose(result, expected) -@xfail_issue_34323 +@pytest.mark.xfail(reason="AssertionError: assert dtype('float32') ==