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: strictly xfail #38901

Merged
merged 6 commits into from
Jan 3, 2021
Merged

TST: strictly xfail #38901

merged 6 commits into from
Jan 3, 2021

Conversation

rhshadrach
Copy link
Member

@rhshadrach rhshadrach commented Jan 2, 2021

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

Continuation of #38881. This handles cases where replacing pytest.xfail is clear, opened #38902 for the handful of remaining cases.

In the case where pytest.xfail is used for a test which has been yet to be implemented, I've added assert False to maintain the current behavior of counting it as an xfail. Maybe there is a better alternative here. raise NotImplementedError.

@rhshadrach rhshadrach added the Testing pandas testing functions or related to the test suite label Jan 2, 2021
@rhshadrach rhshadrach mentioned this pull request Jan 2, 2021
11 tasks
@jbrockmendel
Copy link
Member

In #38881 you used request.applymarker which i guess is equivalent to request.node.add_marker. is that an Officially Supported way of doing this? What we've been doing works, but AFAICT isn't something pytest advertises

@rhshadrach
Copy link
Member Author

@jbrockmendel Yes, they are equivalent. Under the hood, applymarker is just the line self.node.add_marker(marker).

Docs for applymarker:

https://docs.pytest.org/en/stable/reference.html#pytest.FixtureRequest.applymarker

This method is useful if you don’t want to have a keyword/marker on all function invocations.

I take this to mean we are using it in the intended way.

@@ -942,29 +956,37 @@ def test_fillna_datetime64tz(self, index_or_series, fill_val, fill_dtype):
)
self._assert_fillna_conversion(obj, fill_val, exp, fill_dtype)

@pytest.mark.xfail(reason="Test not implemented")
Copy link
Contributor

Choose a reason for hiding this comment

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

we should just parameterize these (followon)

@jreback jreback added this to the 1.3 milestone Jan 3, 2021
@jreback
Copy link
Contributor

jreback commented Jan 3, 2021

great. conflict if you can merge master. also do we have an issue to check for not using pytest.xfail at all in precommmit?

…ail_strict

� Conflicts:
�	pandas/tests/io/excel/test_readers.py
@rhshadrach
Copy link
Member Author

@jreback Merged master, will ping on green. Issue is #38902

@jreback jreback merged commit b5707d6 into pandas-dev:master Jan 3, 2021
@jreback
Copy link
Contributor

jreback commented Jan 3, 2021

thanks @rhshadrach

@rhshadrach rhshadrach deleted the xfail_strict branch January 3, 2021 20:35
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.

4 participants