From 76970d5a4ce7365831021b03fc622c599ebed93b Mon Sep 17 00:00:00 2001 From: AzeezIsh Date: Tue, 26 Mar 2024 15:49:31 -0400 Subject: [PATCH] Removed float coverage for bit specific tests. --- tests/test_logical.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/tests/test_logical.py b/tests/test_logical.py index feba97d..b9e8db2 100644 --- a/tests/test_logical.py +++ b/tests/test_logical.py @@ -4,7 +4,7 @@ import arrayfire_wrapper.dtypes as dtype import arrayfire_wrapper.lib as wrapper -from tests.utility_functions import check_type_supported, get_all_types +from tests.utility_functions import check_type_supported, get_all_types, get_real_types @pytest.mark.parametrize( @@ -62,10 +62,12 @@ def test_and_shapes_invalid(invdtypes: dtype.Dtype) -> None: (random.randint(1, 10), random.randint(1, 10), random.randint(1, 10), random.randint(1, 10)), ], ) -@pytest.mark.parametrize("dtype_name", get_all_types()) +@pytest.mark.parametrize("dtype_name", get_real_types()) def test_bitand_shape_dtypes(shape: tuple, dtype_name: dtype.Dtype) -> None: """Test bitand operation between two arrays of the same shape""" check_type_supported(dtype_name) + if dtype_name == dtype.f16 or dtype_name == dtype.f32: + pytest.skip() lhs = wrapper.randu(shape, dtype_name) rhs = wrapper.randu(shape, dtype_name) @@ -102,10 +104,12 @@ def test_bitand_shapes_invalid(invdtypes: dtype.Dtype) -> None: (random.randint(1, 10), random.randint(1, 10), random.randint(1, 10), random.randint(1, 10)), ], ) -@pytest.mark.parametrize("dtype_name", get_all_types()) +@pytest.mark.parametrize("dtype_name", get_real_types()) def test_bitnot_shape_dtypes(shape: tuple, dtype_name: dtype.Dtype) -> None: """Test bitnot operation between two arrays of the same shape""" check_type_supported(dtype_name) + if dtype_name == dtype.f16 or dtype_name == dtype.f32: + pytest.skip() out = wrapper.randu(shape, dtype_name) result = wrapper.bitnot(out) @@ -140,10 +144,12 @@ def test_bitnot_shapes_invalid(invdtypes: dtype.Dtype) -> None: (random.randint(1, 10), random.randint(1, 10), random.randint(1, 10), random.randint(1, 10)), ], ) -@pytest.mark.parametrize("dtype_name", get_all_types()) +@pytest.mark.parametrize("dtype_name", get_real_types()) def test_bitor_shape_dtypes(shape: tuple, dtype_name: dtype.Dtype) -> None: """Test bitor operation between two arrays of the same shape""" check_type_supported(dtype_name) + if dtype_name == dtype.f16 or dtype_name == dtype.f32: + pytest.skip() lhs = wrapper.randu(shape, dtype_name) rhs = wrapper.randu(shape, dtype_name) @@ -180,10 +186,12 @@ def test_bitor_shapes_invalid(invdtypes: dtype.Dtype) -> None: (random.randint(1, 10), random.randint(1, 10), random.randint(1, 10), random.randint(1, 10)), ], ) -@pytest.mark.parametrize("dtype_name", get_all_types()) +@pytest.mark.parametrize("dtype_name", get_real_types()) def test_bitxor_shape_dtypes(shape: tuple, dtype_name: dtype.Dtype) -> None: """Test bitxor operation between two arrays of the same shape""" check_type_supported(dtype_name) + if dtype_name == dtype.f16 or dtype_name == dtype.f32: + pytest.skip() lhs = wrapper.randu(shape, dtype_name) rhs = wrapper.randu(shape, dtype_name)