.context_manager() only works for object mocking
Closed this issue · 3 comments
eugenenelou commented
There should be both mocker.patch.context_manager
and mocker.patch.object_context_manager
.
nicoddemus commented
Thanks @eugenenelou. PRs are welcome!
eugenenelou commented
I can do one, but my naming proposal would be a breaking change, maybe you want another?
nicoddemus commented
Hmm yeah, you are right. In that case I'm not sure it is worth doing, as one can always just use unittest.mock
then.
Closing for now, feel free to follow up though.