serum
serum copied to clipboard
mock should be a context manager
With the current implementation, the empty context is the default.
This can lead to problems when using mock
without a Context because any mocked types cannot be unmocked in the default context.
By changing mock
to a context manager this is no longer a problem because mocks can be reset when the mock context manager closes, rather than when the context closes.