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

Add a "strict" parameter to xfail #1386

Merged
merged 2 commits into from
Feb 15, 2016

Conversation

nicoddemus
Copy link
Member

  • Add bool type to addini
  • I reviewed skipping.rst while adding the new docs, I think it is easier to use it as a reference while staying true to its original "tutorial" intent (a crude rendering can be seen here).
  • I didn't mention anything about future plans of changing the default value of the strict parameter from False to True. Not sure if we want to do that or not.

Fix #1355

@RonnyPfannschmidt
Copy link
Member

well done, i wish GH had a merge on pass button

@nicoddemus
Copy link
Member Author

Thanks!

@rabbbit could you review as well, and perhaps even try it? Would hate for this to be merged only to discover after the release it still does not fit your needs and others.

@rabbbit
Copy link

rabbbit commented Feb 14, 2016

Does github have any badge options I could give you? :) 👍

Yeah, it looks awesome. I wouldn't bother with the bool-parsing, and I have troubles understanding actual code, but functionality wise it looks perfect.

RonnyPfannschmidt added a commit that referenced this pull request Feb 15, 2016
Add a "strict" parameter to xfail
@RonnyPfannschmidt RonnyPfannschmidt merged commit 1d190dc into pytest-dev:master Feb 15, 2016
@RonnyPfannschmidt
Copy link
Member

we should consider re-priming the xfail result to also handle setup/teardown xfails instead of just doing a fail on exit

i wonder if xpass in strict mode should always report to the terminal :)

@nicoddemus
Copy link
Member Author

Missed the CHANGELOG, I will just push it directly to master

@nicoddemus
Copy link
Member Author

Thanks for merging it!

we should consider re-priming the xfail result to also handle setup/teardown xfails instead of just doing a fail on exit

What do you mean by "re-priming"?

i wonder if xpass in strict mode should always report to the terminal :)

The current implementation fails the test entirely... or do you mean something else?

@RonnyPfannschmidt
Copy link
Member

what i meant is that

a) instead of running fail in the pyfunc_call, we should let a normal xfail propagate
b) interpret xfails based on the strict value, and always report strict ones,
while showing non-strict ones only if requested

@@ -178,6 +184,18 @@ def pytest_runtest_setup(item):

def pytest_pyfunc_call(pyfuncitem):
Copy link
Member Author

Choose a reason for hiding this comment

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

Just realized this is the wrong hook for this. 😦

It is not executing the test at all when strict is True... I will fix this later tonight. 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants