Skip to content
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

TST: Replace pytest.xfail #38929

Merged
merged 2 commits into from
Jan 4, 2021
Merged

Conversation

rhshadrach
Copy link
Member

  • closes #xxxx
  • tests added / passed
  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

Part of #38902.

@jreback jreback added the Testing pandas testing functions or related to the test suite label Jan 3, 2021
@jreback jreback added this to the 1.3 milestone Jan 3, 2021
@@ -388,7 +388,7 @@ def test_asi8_deprecation(self, index):
@pytest.mark.parametrize("na_position", [None, "middle"])
def test_sort_values_invalid_na_position(index_with_missing, na_position):
if isinstance(index_with_missing, (CategoricalIndex, MultiIndex)):
pytest.xfail("missing value sorting order not defined for index type")
pytest.skip("missing value sorting order not defined for index type")
Copy link
Contributor

Choose a reason for hiding this comment

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

hmm i would leave these as xfail and add_marker here. e.g. these are a missing api that we should eventually fix.

cc @jbrockmendel

Copy link
Member Author

@rhshadrach rhshadrach Jan 3, 2021

Choose a reason for hiding this comment

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

For MultiIndex we get NotImplementedError; this should certainly be left as xfail. However for CategoricalIndex the computation is successful and sometimes the order is "correct" and sometimes not. I think this should skip instead.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry, my remark is about test_sort_values_with_missing, the test immediately below this one.

@jreback jreback merged commit 6aaa76f into pandas-dev:master Jan 4, 2021
@jreback
Copy link
Contributor

jreback commented Jan 4, 2021

thanks @rhshadrach

@rhshadrach rhshadrach deleted the pytest_xfail_2 branch January 4, 2021 21:05
luckyvs1 pushed a commit to luckyvs1/pandas that referenced this pull request Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants