6 ms·
I can't see how this is different from mock.py. Mock can also do temporary patching: with patch('path.to.object') as my_mock: my_mock.method.return_value =
by yyyt 14y ago
I can't see how this is different from mock.py. Mock can also do temporary patching:
with patch('path.to.object') as my_mock:
my_mock.method.return_value = ...
also you can patch a module/class with a function.