]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-35022: unittest.mock.MagicMock now also supports __fspath__ (GH-9960)
authorMax Bélanger <aeromax@gmail.com>
Thu, 25 Oct 2018 21:48:58 +0000 (14:48 -0700)
committerVictor Stinner <vstinner@redhat.com>
Thu, 25 Oct 2018 21:48:58 +0000 (23:48 +0200)
commit6c83d9f4a72905d968418bef670bb3091d2744db
tree36e86ffe12d882014bed38909a417a6f713b2e93
parent1770d1c5121ed6c64d7072875738f97e07eede8a
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.
Doc/library/unittest.mock.rst
Lib/unittest/mock.py
Lib/unittest/test/testmock/testmagicmethods.py
Misc/NEWS.d/next/Library/2018-10-18-17-57-28.bpo-35022.KeEF4T.rst [new file with mode: 0644]