You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a "defaults" dict to mocker to allow changing defaults that are passed to mock.patch #55
changed the title [-]Allow to enable autospec by default[/-][+]Add a "defaults" dict to mocker to allow changing defaults that are passed to mock.patch[/+]on Mar 31, 2017
Activity
nicoddemus commentedon Sep 17, 2016
Hey @remcohaszing,
Sorry, this went under the radar.
Perhaps it would be better to add this as a
pytest.inioption?blueyed commentedon Sep 17, 2016
Adding an option feels dirty to me: then we end up with a lot of them in the end probably?!
What about overriding the
mockerfixture in your conftest to adjust it like you need it (see #37 (comment))?nicoddemus commentedon Sep 18, 2016
@blueyed you got a point, we may end up with a lot of options, which doesn't really scale.
So I'm assuming @blueyed means something like this:
The cool thing is that you can adjust the options per-test, per-module, or even the entire test suite:
I like it. 😁
[-]Allow to enable autospec by default[/-][+]Add a "defaults" dict to mocker to allow changing defaults that are passed to mock.patch[/+]