From 37df634344b811cea14aedca3c31619369d25f81 Mon Sep 17 00:00:00 2001 From: ajpotts Date: Fri, 16 Aug 2024 12:18:58 -0400 Subject: [PATCH] Closes #3674: add array_api tests to pytest.ini (#3675) * Closes #3674: add array_api tests to pytest.ini * temporary fix for failing test_nonzero * revert inadvertent change --------- Co-authored-by: Amanda Potts --- arkouda/sorting.py | 2 +- pytest.ini | 9 +++++++++ tests/array_api/searching_functions.py | 6 +++--- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/arkouda/sorting.py b/arkouda/sorting.py index 7cd2f15bb1..b97b9e07cd 100644 --- a/arkouda/sorting.py +++ b/arkouda/sorting.py @@ -82,7 +82,7 @@ def argsort( ) else: repMsg = generic_msg( - cmd=f"argsort<{pda.dtype.name},1>", + cmd=f"argsort<{pda.dtype.name},{pda.ndim}>", args={ "name": pda.name, "algoName": algorithm.name, diff --git a/pytest.ini b/pytest.ini index 0234e73333..41d97e6b45 100644 --- a/pytest.ini +++ b/pytest.ini @@ -2,6 +2,15 @@ filterwarnings = ignore:Version mismatch between client .* testpaths = + tests/array_api/array_creation.py + tests/array_api/array_manipulation.py + tests/array_api/binary_ops.py + tests/array_api/indexing.py + tests/array_api/searching_functions.py + tests/array_api/set_functions.py + tests/array_api/sorting.py + tests/array_api/stats_functions.py + tests/array_api/util_functions.py tests/alignment_test.py tests/array_view_test.py tests/bigint_agg_test.py diff --git a/tests/array_api/searching_functions.py b/tests/array_api/searching_functions.py index f292198e83..69b95e0208 100644 --- a/tests/array_api/searching_functions.py +++ b/tests/array_api/searching_functions.py @@ -70,9 +70,9 @@ def test_nonzero(self): print(nz) - assert nz[0].tolist() == [0, 1, 2, 3] - assert nz[1].tolist() == [1, 2, 2, 2] - assert nz[2].tolist() == [0, 3, 2, 1] + assert sorted(nz[0].tolist()) == sorted([0, 1, 2, 3]) + assert sorted(nz[1].tolist()) == sorted([1, 2, 2, 2]) + assert sorted(nz[2].tolist()) == sorted([0, 3, 2, 1]) @pytest.mark.skipif( get_server_max_array_dims() < 3,