-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
TST: Testing for mixed int/str Index #61349
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
base: main
Are you sure you want to change the base?
Conversation
…t_values_invalid_na_position
…t_values_with_missing
…xes\multi\test_setops.py
@xaris96 Can you fix the broken tests and remove all your debug files from this PR please? |
A PR is mainly a UI for your fork's branch. The usual way of working is to just keep updating your fork's branch, until reviewers are happy and it's merged into the project's main branch. |
seems like a reasonable approach. |
pandas/tests/base/test_misc.py
Outdated
@@ -147,6 +147,11 @@ def test_searchsorted(request, index_or_series_obj): | |||
# See gh-12238 | |||
obj = index_or_series_obj | |||
|
|||
if any(isinstance(x, str) for x in obj) and any(isinstance(x, int) for x in obj): |
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.
Can you just do if obj.inferred_type == "mixed"
? And everywhere below where you need to xfail this new index
pandas/tests/indexes/test_setops.py
Outdated
@@ -248,12 +235,21 @@ def test_intersection_base(self, index): | |||
|
|||
@pytest.mark.filterwarnings(r"ignore:PeriodDtype\[B\] is deprecated:FutureWarning") | |||
def test_union_base(self, index): | |||
if index.inferred_type in ["mixed", "mixed-integer"]: | |||
pytest.skip("Mixed-type Index not orderable; union fails") |
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.
Can you use the xfail
pattern you used above?
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.
Generally could you:
- use
index.inferred_type == "mixed
if you need special logic to handle it - use xfail over skip if you're expecting the test to fail
@mroeschke okay |
@datapythonista Hi, I’m encountering an issue with test_rolling_var_numerical_issues, even though I haven't changed anything related to it. It was passing before, but now it's failing. Could you help me understand what might be causing this? |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.