Skip to content

Commit

Permalink
fixes from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
ajpotts committed Sep 18, 2024
1 parent 9880f09 commit 3cc1e3b
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions tests/testing/asserters_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def test_assert_almost_equal(self, size, left_as_arkouda, right_as_arkouda):
assert_almost_equal(df, df3, atol=atol, rtol=rtol)
assert_almost_equivalent(convert_left(df), convert_right(df3), atol=atol, rtol=rtol)

@pytest.mark.skip_if_max_rank_less_than(2)
@pytest.mark.skip_if_max_rank_less_than(3)
@pytest.mark.parametrize("size", pytest.prob_size)
@pytest.mark.parametrize("left_as_arkouda", [True, False])
@pytest.mark.parametrize("right_as_arkouda", [True, False])
Expand All @@ -192,9 +192,10 @@ def test_assert_almost_equal_multi_dim(self, size, left_as_arkouda, right_as_ark
if both_ak:
assert_almost_equal(a, a2, atol=atol, rtol=rtol)
assert_almost_equivalent(convert_left(a), convert_right(a2), atol=atol, rtol=rtol)
with pytest.raises(AssertionError):
if both_ak:
if both_ak:
with pytest.raises(AssertionError):
assert_almost_equal(a, a3, atol=atol, rtol=rtol)
with pytest.raises(AssertionError):
assert_almost_equivalent(convert_left(a), convert_right(a3), atol=atol, rtol=rtol)

def test_assert_almost_equal_scalars(self):
Expand Down Expand Up @@ -935,9 +936,10 @@ def test_assert_equal_multi_dim(self, size, left_as_arkouda, right_as_arkouda):
if both_ak:
assert_equal(a, a)
assert_equivalent(convert_left(a), convert_right(a))
with pytest.raises(AssertionError):
if both_ak:
if both_ak:
with pytest.raises(AssertionError):
assert_equal(a, a2)
with pytest.raises(AssertionError):
assert_equivalent(convert_left(a), convert_right(a2))

def test_assert_equal_scalars(self):
Expand Down Expand Up @@ -1046,9 +1048,10 @@ def test_assert_arkouda_array_equal_multi_dim(self, size, left_as_arkouda, right
if both_ak:
assert_arkouda_array_equal(a, a)
assert_arkouda_array_equivalent(convert_left(a), convert_right(a))
with pytest.raises(AssertionError):
if both_ak:
if both_ak:
with pytest.raises(AssertionError):
assert_arkouda_array_equal(a, a2)
with pytest.raises(AssertionError):
assert_arkouda_array_equivalent(convert_left(a), convert_right(a2))

def test_assert_arkouda_segarray_equal(self):
Expand Down

0 comments on commit 3cc1e3b

Please sign in to comment.