Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Raise error on every patch context manager
On pytest-dev#165, a change was added to raise an Exception when trying to use `mocker.patch.object` as a context manager, as its behavior is not supported in the plugin. However, the context managers for the remaining patch options (dict, multiple, and normal patch) still work as usual. With this change, we check if we are in a context manager when starting the patch, so all the methods will raise the exception if corresponds
- Loading branch information