diff --git a/tests/pdarrayclass_test.py b/tests/pdarrayclass_test.py index 76351b17bc..bc04445df5 100644 --- a/tests/pdarrayclass_test.py +++ b/tests/pdarrayclass_test.py @@ -23,35 +23,40 @@ class TestPdarrayClass: @pytest.mark.skip_if_max_rank_less_than(2) - def test_reshape(self): - a = ak.arange(4) + @pytest.mark.parametrize("dtype", DTYPES) + def test_reshape(self, dtype): + a = ak.arange(4, dtype=dtype) r = a.reshape((2, 2)) assert r.shape == (2, 2) assert isinstance(r, ak.pdarray) - def test_shape(self): - a = ak.arange(4) - np_a = np.arange(4) + @pytest.mark.parametrize("dtype", list(set(DTYPES) - set(["bool"]))) + def test_shape(self, dtype): + a = ak.arange(4, dtype=dtype) + np_a = np.arange(4, dtype=dtype) assert isinstance(a.shape, tuple) assert a.shape == np_a.shape @pytest.mark.skip_if_max_rank_less_than(2) - def test_shape_multidim(self): - a = ak.arange(4).reshape((2, 2)) - np_a = np.arange(4).reshape((2, 2)) + @pytest.mark.parametrize("dtype", list(set(DTYPES) - set(["bool"]))) + def test_shape_multidim(self, dtype): + a = ak.arange(4, dtype=dtype).reshape((2, 2)) + np_a = np.arange(4, dtype=dtype).reshape((2, 2)) assert isinstance(a.shape, tuple) assert a.shape == np_a.shape @pytest.mark.parametrize("size", pytest.prob_size) - def test_flatten(self, size): - a = ak.arange(size) + @pytest.mark.parametrize("dtype", DTYPES) + def test_flatten(self, size, dtype): + a = ak.arange(size, dtype=dtype) ak_assert_equal(a.flatten(), a) @pytest.mark.skip_if_max_rank_less_than(3) + @pytest.mark.parametrize("dtype", DTYPES) @pytest.mark.parametrize("size", pytest.prob_size) - def test_flatten(self, size): + def test_flatten_multidim(self, size, dtype): size = size - (size % 4) - a = ak.arange(size) + a = ak.arange(size, dtype=dtype) b = a.reshape((2, 2, size / 4)) ak_assert_equal(b.flatten(), a) @@ -114,12 +119,13 @@ def test_is_locally_sorted_multi_locale(self, size): assert not is_sorted(a) @pytest.mark.skip_if_max_rank_less_than(3) + @pytest.mark.skip_if_nl_greater_than(2) @pytest.mark.parametrize("dtype", DTYPES) @pytest.mark.parametrize("axis", [None, 0, 1, (0, 2), (0, 1, 2)]) def test_is_locally_sorted_multidim(self, dtype, axis): from arkouda.pdarrayclass import is_locally_sorted - a = ak.array(ak.randint(0, 100, (5, 7, 4), dtype=ak.int64, seed=SEED)) + a = ak.array(ak.randint(0, 100, (10, 10, 10), dtype=ak.int64, seed=SEED)) sorted = is_locally_sorted(a, axis=axis) if isinstance(sorted, np.bool_): assert not sorted