-
Notifications
You must be signed in to change notification settings - Fork 588
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
Move @fails annotation into main test decorators #24
Comments
See |
I think this issue was actually about making fails part of the public API, but I don't think this was ever a good idea and people should be using pytest's xfail or equivalent for it really (maybe we should too) |
Ah, right. I agree that it's a separate concern to the rest of the Hypothesis API, and users should look to their test runner of choice. Probably still useful for us to have a runner-agnostic fails_with though. |
Yup. It's perfectly sensible to have extra decorators like this internally and/or in the test helpers, just not part of the public API. Past-@DRMacIver had some odd ideas about API design which I've had to unlearn the hard way. :-) |
For posterity: Our internal decorator is instead more like a decorator form of |
fix typo in anatomy-of-a-test
I was reading "Software Testing with Quickcheck" by John Hughes and in it he points out that keeping around failing properties with a marker that they fail is actually a useful thing which people should do as part of their test suites. This seems like an eminently fair point. I already have something like this in the tests for my test decorators. It currently depends on py.test but could easily be made not to. Do this and merge it into the main API.
The text was updated successfully, but these errors were encountered: