Skip to content

Commit

Permalink
Fix test_array_element_rewriting
Browse files Browse the repository at this point in the history
* Updates outdated use of `xp.unique()` to `xp.unique_values()`
* Removes unnecessary `@assumes_distinct_nans`
  • Loading branch information
honno authored and Zac-HD committed Dec 2, 2021
1 parent 0de0196 commit 8fb931e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions hypothesis-python/tests/array_api/test_arrays.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,6 @@ def test_efficiently_generate_unique_arrays_using_all_elements(x):


@needs_xp_unique_values
@assumes_distinct_nans
@given(st.data(), st.integers(-100, 100), st.integers(1, 100))
def test_array_element_rewriting(data, start, size):
"""Unique strategy generates arrays with expected elements."""
Expand All @@ -416,7 +415,7 @@ def test_array_element_rewriting(data, start, size):
)
)
x_set_expect = xp.linspace(start, start + size - 1, size, dtype=xp.int64)
x_set = xp.sort(xp.unique(x))
x_set = xp.sort(xp.unique_values(x))
assert xp.all(x_set == x_set_expect)


Expand Down

0 comments on commit 8fb931e

Please sign in to comment.