-
Notifications
You must be signed in to change notification settings - Fork 124
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
Avoid TypeError in call_historic() #110
Avoid TypeError in call_historic() #110
Conversation
Heh, thanks @rmfitzpatrick! @RonnyPfannschmidt @nicoddemus I think we need some tests to cover this API. Can you guys point me to where this |
The only place I could find that uses is the call of the def do_setns(dic):
import pytest
setns(pytest, dic)
self.hook.pytest_namespace.call_historic(do_setns, {})
self.hook.pytest_addoption.call_historic(kwargs=dict(parser=self._parser)) You are right, |
|
Agree that This would warrant a |
the old and the new name can be supported simultaneous, the old name should trigger a deprecation and we need pytest release as well |
Fair but what else would the callback be for ;P - either way I like explicit so @rmfitzpatrick Do you mind adding a small test which would have caught this bug without your patch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test to avoid future regressions. 🙇
Ensure that if a result callback (dubbed `proc` for the moment) provided to `PluginManager.call_historic()` is `None`, no error occurs. Relates to pytest-dev#110
@nicoddemus I've gone and added the requested test in #119. |
Closing in favour of #119. |
Ensure that if a result callback (dubbed `proc` for the moment) provided to `PluginManager.call_historic()` is `None`, no error occurs. Relates to pytest-dev#110
The default argument for
proc
in_HookCaller.call_historic()
isNone
. No attempt should be made to call it.