Skip to content

Commit

Permalink
Removed float coverage for bit specific tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
AzeezIsh authored and syurkevi committed Apr 12, 2024
1 parent 6e58189 commit 76970d5
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions tests/test_logical.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 76970d5

Please sign in to comment.