Skip to content

Adjust merge and categorical tests for dask-expr#10762

Merged
phofl merged 1 commit intodask:mainfrom
phofl:merger_tests
Jan 10, 2024
Merged

Adjust merge and categorical tests for dask-expr#10762
phofl merged 1 commit intodask:mainfrom
phofl:merger_tests

Conversation

@phofl
Copy link
Copy Markdown
Collaborator

@phofl phofl commented Jan 9, 2024

  • Closes #xxxx
  • Tests added / passed
  • Passes pre-commit run --all-files

Copy link
Copy Markdown
Contributor

@milesgranger milesgranger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question and nit about pytest.skip uses is all. LGTM otherwise, thank you!


Edit: The 3.12 failures ought to be fixed after update, fixed in dask/dask-expr#689. The other seems unrelated...

FAILED dask/tests/test_delayed.py::test_name_consistent_across_instances - AssertionError: assert 'identity-096...f6f4120187a73' == 'identity-4f3...7c3ac07f7201a'
  - identity-4f318f3c27b869239e97c3ac07f7201a
  + identity-09699241ef8c5469dd9f6f4120187a73

Comment on lines +1344 to +1348
errors = (
(ValueError, TypeError)
if pa is None
else (ValueError, TypeError, ArrowNotImplementedError)
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing the additional error also depends on DASK_EXPR_ENABLED, is that right? Is it worth making this conditional as well? (My guess is no. :) )

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not no, the tests was already ugly before this pr :)

Comment on lines 324 to +326
def test_merge_asof_indexed():
if DASK_EXPR_ENABLED:
pytest.skip("merge_asof not available yet in dask-expr")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on pytest docs, I think xfail is more appropriate in these situations.

Suggested change
def test_merge_asof_indexed():
if DASK_EXPR_ENABLED:
pytest.skip("merge_asof not available yet in dask-expr")
@pytest.mark.xfail(DASK_EXPR_ENABLED, reason="merge_asof not available ye tin dask-expr")
def test_merge_asof_indexed():

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That doesn't work unfortunately, we can't evaluate the config in these skip contexts, don't know why

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, is that just because it's the decorator.. would replacing the in-function skip with xfail also not work? Just curious if there is a difference in the two or if when used as a decorator.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the decorator, inline all of them work

@phofl phofl merged commit cf52afe into dask:main Jan 10, 2024
@phofl phofl deleted the merger_tests branch January 10, 2024 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants