-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH/TST: Add TestBaseArithmeticOps tests for ArrowExtensionArray #47601 #47645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
3deef7c
start adding arith tests
mroeschke 82d7734
Add more arithmetic tests
mroeschke 4957475
Override _combine in the future
mroeschke d976797
Merge remote-tracking branch 'upstream/main' into arrow/comparisons
mroeschke 5c7d4bf
Finalize tests
mroeschke f38bf94
Add checked
mroeschke 5b97245
Merge remote-tracking branch 'upstream/main' into arrow/comparisons
mroeschke 6f5b57b
Can raise NotImplimented instead of TypeError now
mroeschke eb99dd5
Merge remote-tracking branch 'upstream/main' into arrow/comparisons
mroeschke d1cb7f3
Merge remote-tracking branch 'upstream/main' into arrow/comparisons
mroeschke 3d5d96d
Fix typing, compute kernel compat
mroeschke f03f774
pyarrow 8 supports some duration ops
mroeschke 726c6b7
Add to pandas compat
mroeschke 2de348c
xor not implememnted in min pyarrow
mroeschke 1dd2f79
xor not implememnted in min pyarrow
mroeschke 83011d5
Merge remote-tracking branch 'upstream/main' into arrow/comparisons
mroeschke 0aed029
Fix pyarrow=8 temporal condition
mroeschke d30877f
min version compat
mroeschke afe9468
Merge remote-tracking branch 'upstream/main' into arrow/comparisons
mroeschke f374451
more compat
mroeschke 88449db
Add support for truediv
mroeschke 4034a1c
Add floordiv
mroeschke 9bfd503
Merge remote-tracking branch 'upstream/main' into arrow/comparisons
mroeschke 81c609f
min version compat
mroeschke 6bacdba
Merge remote-tracking branch 'upstream/main' into arrow/comparisons
mroeschke 72e8923
Add comparison tests
mroeschke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,7 +101,7 @@ def test_add(dtype, request): | |
"unsupported operand type(s) for +: 'ArrowStringArray' and " | ||
"'ArrowStringArray'" | ||
) | ||
mark = pytest.mark.xfail(raises=TypeError, reason=reason) | ||
mark = pytest.mark.xfail(raises=NotImplementedError, reason=reason) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BTW (not necessarily for this PR), but |
||
request.node.add_marker(mark) | ||
|
||
a = pd.Series(["a", "b", "c", None, None], dtype=dtype) | ||
|
@@ -142,7 +142,7 @@ def test_add_2d(dtype, request): | |
def test_add_sequence(dtype, request): | ||
if dtype.storage == "pyarrow": | ||
reason = "unsupported operand type(s) for +: 'ArrowStringArray' and 'list'" | ||
mark = pytest.mark.xfail(raises=TypeError, reason=reason) | ||
mark = pytest.mark.xfail(raises=NotImplementedError, reason=reason) | ||
request.node.add_marker(mark) | ||
|
||
a = pd.array(["a", "b", None, None], dtype=dtype) | ||
|
@@ -160,7 +160,7 @@ def test_add_sequence(dtype, request): | |
def test_mul(dtype, request): | ||
if dtype.storage == "pyarrow": | ||
reason = "unsupported operand type(s) for *: 'ArrowStringArray' and 'int'" | ||
mark = pytest.mark.xfail(raises=TypeError, reason=reason) | ||
mark = pytest.mark.xfail(raises=NotImplementedError, reason=reason) | ||
request.node.add_marker(mark) | ||
|
||
a = pd.array(["a", "b", None], dtype=dtype) | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
failing with pyarrow 2.0.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I merged @mroeschke's follow up PR (#47752), but I am now wondering: we don't have CI builds with pyarrow 2.0 to catch this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't, only testing 1.01 (min), 5, 6, 7. IIRC pyarrow version 2 or 3 were causing the CI to time out around the read_csv tests so that's why 2 or 3 weren't included #43650