FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add a "strict" parameter to xfail by nicoddemus · Pull Request #1386 · pytest-dev/pytest · GitHub

Add a "strict" parameter to xfail - #1386

Merged
RonnyPfannschmidt merged 2 commits into
pytest-dev:masterfrom
nicoddemus:strict-xpass
Feb 15, 2016
Merged

Add a "strict" parameter to xfail#1386
RonnyPfannschmidt merged 2 commits into
pytest-dev:masterfrom
nicoddemus:strict-xpass

Conversation

Copy link
Copy Markdown
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

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
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 commented Feb 14, 2016

Copy link
Copy Markdown

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
RonnyPfannschmidt merged commit 1d190dc into pytest-dev:master Feb 15, 2016

Copy link
Copy Markdown
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 :)

Copy link
Copy Markdown
Member Author

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

Copy link
Copy Markdown
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?

Copy link
Copy Markdown
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

Comment thread _pytest/skipping.py
@@ -178,6 +184,18 @@ def pytest_runtest_setup(item):

def pytest_pyfunc_call(pyfuncitem):

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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. 😞

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
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


Back | FazBrowse Home | New Git URL