-
Notifications
You must be signed in to change notification settings - Fork 586
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
A test fails by raising TypeError exception whenever one of the test function arguments is named 'f' #38
Comments
|
Ha. What a weird bug. You're entirely right, and I'm pretty sure I know how this is happening. I'll try to have a fix out soon. |
DRMacIver
added a commit
that referenced
this issue
Mar 22, 2015
This fixes issue #38. The problem was that the argument to accept gets shadowed by an argument to our function so we try to call the wrong value. In theory you can still trigger this bug by calling an argument to your function hypothesis_reflection_internal_name_do_not_use but you basically have it coming if you do that and I think I'm happy to say that part of the spec to using @given is don't do that then.
DRMacIver
added a commit
that referenced
this issue
Mar 22, 2015
This fixes issue #38. The problem was that the argument to accept gets shadowed by an argument to our function so we try to call the wrong value. In theory you can still trigger this bug by calling an argument to your function hypothesis_reflection_internal_name_do_not_use but you basically have it coming if you do that and I think I'm happy to say that part of the spec to using @given is don't do that then.
|
Right. This should be fixed now. If you upgrade to 0.7.2 everything should work. |
|
Oh, I meant to say by the way, thanks for the well put together bug report. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A test will always fail with the exception that an instance of HypothesisProvided is not callable whenver
one of the arguments test function arguments is named 'f'. For example, given
when run with py.test produces
however, the following
works just fine. Note that I renamed 'f' to 'y'. I get the same outcome regardless of the number of arguments a test function has.
If it help, I'm on
platform darwin -- Python 3.4.3 -- py-1.4.26 -- pytest-2.6.4according to py.test.The text was updated successfully, but these errors were encountered: