diff options
author | Max BĂ©langer <aeromax@gmail.com> | 2018-10-25 21:48:58 (GMT) |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2018-10-25 21:48:58 (GMT) |
commit | 6c83d9f4a72905d968418bef670bb3091d2744db (patch) | |
tree | 36e86ffe12d882014bed38909a417a6f713b2e93 /Misc | |
parent | 1770d1c5121ed6c64d7072875738f97e07eede8a (diff) | |
download | cpython-6c83d9f4a72905d968418bef670bb3091d2744db.zip cpython-6c83d9f4a72905d968418bef670bb3091d2744db.tar.gz cpython-6c83d9f4a72905d968418bef670bb3091d2744db.tar.bz2 |
bpo-35022: unittest.mock.MagicMock now also supports __fspath__ (GH-9960)
The MagicMock class supports many magic methods, but not __fspath__. To ease
testing with modules such as os.path, this function is now supported by default.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2018-10-18-17-57-28.bpo-35022.KeEF4T.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2018-10-18-17-57-28.bpo-35022.KeEF4T.rst b/Misc/NEWS.d/next/Library/2018-10-18-17-57-28.bpo-35022.KeEF4T.rst new file mode 100644 index 0000000..426be70 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2018-10-18-17-57-28.bpo-35022.KeEF4T.rst @@ -0,0 +1,2 @@ +:class:`unittest.mock.MagicMock` now supports the ``__fspath__`` method +(from :class:`os.PathLike`). |