-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Adjust Series specific tests for string option #55538
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
19 commits
Select commit
Hold shift + click to select a range
9e9f567
Add env variable for infer string option
phofl 23595ab
Add whatsnew
phofl f3bb720
Fix method tests for using infer string option
phofl 2c8de1b
Fix tests
phofl 3b5e7e7
Fix more tests
phofl b613e5a
TST: Fix assert_is_sorted for eas
phofl 93ee4d7
BUG: Series inferring new string dtype even if dtype is given for sca…
phofl c0f629f
Merge branch 'ser_string_storage' into series_string_tests
phofl 43a27a1
Merge branch 'is_sorted' into series_string_tests
phofl 224b7f6
Fix tests for series folder
phofl 8cf3af5
Fix
phofl e49c77b
Update v2.1.2.rst
phofl f32ef80
Update conftest.py
phofl f546925
Merge branch 'main' into series_string_tests
phofl 3d24dc2
Merge remote-tracking branch 'upstream/main' into series_string_tests
phofl 75f1ae1
Update v2.1.2.rst
phofl ec54b76
Update test_arithmetic.py
phofl f93f01b
Add gh refs
phofl 07336dd
Add gh refs
phofl 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 |
---|---|---|
|
@@ -71,7 +71,7 @@ def test_getitem_unrecognized_scalar(self): | |
def test_getitem_negative_out_of_bounds(self): | ||
ser = Series(["a"] * 10, index=["a"] * 10) | ||
|
||
msg = "index -11 is out of bounds for axis 0 with size 10" | ||
msg = "index -11 is out of bounds for axis 0 with size 10|index out of bounds" | ||
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. can you use a "|".join pattern 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. I don't feel super strong here but I prefer the pipe pattern for 2 options |
||
warn_msg = "Series.__getitem__ treating keys as positions is deprecated" | ||
with pytest.raises(IndexError, match=msg): | ||
with tm.assert_produces_warning(FutureWarning, match=warn_msg): | ||
|
@@ -363,7 +363,9 @@ def test_getitem_no_matches(self, box): | |
key = Series(["C"], dtype=object) | ||
key = box(key) | ||
|
||
msg = r"None of \[Index\(\['C'\], dtype='object'\)\] are in the \[index\]" | ||
msg = ( | ||
r"None of \[Index\(\['C'\], dtype='object|string'\)\] are in the \[index\]" | ||
) | ||
with pytest.raises(KeyError, match=msg): | ||
ser[key] | ||
|
||
|
@@ -437,7 +439,7 @@ def test_getitem_boolean_empty(self): | |
|
||
# GH#5877 | ||
# indexing with empty series | ||
ser = Series(["A", "B"]) | ||
ser = Series(["A", "B"], dtype=object) | ||
expected = Series(dtype=object, index=Index([], dtype="int64")) | ||
result = ser[Series([], dtype=object)] | ||
tm.assert_series_equal(result, expected) | ||
|
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
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.
Uh oh!
There was an error while loading. Please reload this page.