Skip to content

Commit

Permalink
Closes Bears-R-Us#3731: Add skip_if_max_rank_less_than markers to num…
Browse files Browse the repository at this point in the history
…eric_tests.py (Bears-R-Us#3732)

Co-authored-by: Amanda Potts <ajpotts@users.noreply.github.com>
  • Loading branch information
ajpotts and ajpotts committed Aug 30, 2024
1 parent 4673453 commit e08b0db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion tests/client_test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest

import arkouda as ak
from arkouda.client import generic_msg, get_max_array_rank
from arkouda.client import generic_msg
from server_util.test.server_test_util import TestRunningMode, start_arkouda_server


Expand Down
16 changes: 5 additions & 11 deletions tests/numeric_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -838,12 +838,10 @@ def test_putmask(self, prob_size):
# the resulting matrices are on the order of size*size.

# tril works on ints, floats, or bool

@pytest.mark.skip_if_max_rank_less_than(2)
@pytest.mark.parametrize("data_type", INT_FLOAT_BOOL)
@pytest.mark.parametrize("prob_size", pytest.prob_size)
def test_tril(self, data_type, prob_size):
if get_max_array_rank() < 2:
pytest.skip()

size = int(sqrt(prob_size))

Expand Down Expand Up @@ -891,11 +889,10 @@ def test_triu(self, data_type, prob_size):

# transpose works on ints, floats, or bool

@pytest.mark.skip_if_max_rank_less_than(2)
@pytest.mark.parametrize("data_type", INT_FLOAT_BOOL)
@pytest.mark.parametrize("prob_size", pytest.prob_size)
def test_transpose(self, data_type, prob_size):
if get_max_array_rank() < 2:
pytest.skip()

size = int(sqrt(prob_size))

Expand All @@ -915,11 +912,10 @@ def test_transpose(self, data_type, prob_size):
assert check(npa, ppa, data_type)

# eye works on ints, floats, or bool
@pytest.mark.skip_if_max_rank_less_than(2)
@pytest.mark.parametrize("data_type", INT_FLOAT_BOOL)
@pytest.mark.parametrize("prob_size", pytest.prob_size)
def test_eye(self, data_type, prob_size):
if get_max_array_rank() < 2:
pytest.skip()

size = int(sqrt(prob_size))

Expand All @@ -939,12 +935,11 @@ def test_eye(self, data_type, prob_size):
assert check(nda, pda, data_type)

# matmul works on ints, floats, or bool
@pytest.mark.skip_if_max_rank_less_than(2)
@pytest.mark.parametrize("data_type1", INT_FLOAT_BOOL)
@pytest.mark.parametrize("data_type2", INT_FLOAT_BOOL)
@pytest.mark.parametrize("prob_size", pytest.prob_size)
def test_matmul(self, data_type1, data_type2, prob_size):
if get_max_array_rank() < 2:
pytest.skip()

size = int(sqrt(prob_size))

Expand All @@ -968,12 +963,11 @@ def test_matmul(self, data_type1, data_type2, prob_size):
# vecdot works on ints, floats, or bool, with the limitation that both inputs can't
# be bool

@pytest.mark.skip_if_max_rank_less_than(2)
@pytest.mark.parametrize("data_type1", INT_FLOAT_BOOL)
@pytest.mark.parametrize("data_type2", INT_FLOAT)
@pytest.mark.parametrize("prob_size", pytest.prob_size)
def test_vecdot(self, data_type1, data_type2, prob_size):
if get_max_array_rank() < 2:
pytest.skip()

depth = np.random.randint(2, 10)
width = prob_size // depth
Expand Down

0 comments on commit e08b0db

Please sign in to comment.