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? |
nicoddemus
left a comment
There was a problem hiding this comment.
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
procin_HookCaller.call_historic()isNone. No attempt should be made to call it.