diff options
author | Max BeĢlanger <aeromax@gmail.com> | 2018-10-25 14:48:58 -0700 |
---|---|---|
committer | Chris Withers <chris@withers.org> | 2019-04-30 08:39:55 +0100 |
commit | 55971296dc33650318a6397b21d4c4296a8dbca1 (patch) | |
tree | 28920f1b7aa06ba51428ffb4f569e714bd9089f2 /NEWS.d | |
parent | d42410a09aeac50d5bb8a84bc1ab97dfd70ce909 (diff) | |
download | mock-55971296dc33650318a6397b21d4c4296a8dbca1.tar.gz |
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.
Backports: 6c83d9f4a72905d968418bef670bb3091d2744db
Signed-off-by: Chris Withers <chris@simplistix.co.uk>
Needed some re-working as this can only work and apply on Python 3
Diffstat (limited to 'NEWS.d')
-rw-r--r-- | NEWS.d/2018-10-18-17-57-28.bpo-35022.KeEF4T.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/NEWS.d/2018-10-18-17-57-28.bpo-35022.KeEF4T.rst b/NEWS.d/2018-10-18-17-57-28.bpo-35022.KeEF4T.rst new file mode 100644 index 0000000..426be70 --- /dev/null +++ b/NEWS.d/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`). |