Skip to content

Commit

Permalink
GH-37303: [Python] Update test_option_class_equality due to Cumulativ…
Browse files Browse the repository at this point in the history
…eSumOptions refactor (#37305)

### Rationale for this change

Merging of #36977 caused a CI failure due to a test giving a warning.

### What changes are included in this PR?

Add a `filterwarnings` mark to the failing tests. This also tests the deprecation message.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* Closes: #37303

Authored-by: AlenkaF <[email protected]>
Signed-off-by: Joris Van den Bossche <[email protected]>
  • Loading branch information
AlenkaF authored Aug 23, 2023
1 parent bfb9219 commit ac5468c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions python/pyarrow/tests/test_compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ def test_exported_option_classes():
param.VAR_KEYWORD)


@pytest.mark.filterwarnings(
"ignore:pyarrow.CumulativeSumOptions is deprecated as of 14.0"
)
def test_option_class_equality():
options = [
pc.ArraySortOptions(),
Expand Down Expand Up @@ -214,8 +217,8 @@ def test_option_class_equality():
buf = option.serialize()
deserialized = pc.FunctionOptions.deserialize(buf)
assert option == deserialized
# TODO remove the check under the if statement
# when the deprecated class CumulativeSumOptions is removed.
# TODO remove the check under the if statement and the filterwarnings
# mark when the deprecated class CumulativeSumOptions is removed.
if repr(option).startswith("CumulativeSumOptions"):
assert repr(deserialized).startswith("CumulativeOptions")
else:
Expand Down

0 comments on commit ac5468c

Please sign in to comment.