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
Copied over the original CPython's unittest.mock.mock_open tests (with some modifications) as part of the library's test suite. This brought up a few differences in the API and usage to light which were fixed as part of this release.
Fixed
Allow to omit the mode argument, since the builtin open will understand this as 'r'.
Reset position in the file-like mock in consecutive calls to a patched open (either a direct call or when used as a context manager).
Define FileLikeMock as an iterator, which was an API of the builtin open it was missing: