We have plenty of tests calling into `os.path.*` functions, and as Python 3.6+ gets more stringent about checking for `os.PathLike` compliance, it would greatly simplify our lives for `MagicMock` to support `__fspath__`.
Thanks Maxime Belanger for your contribution! Thanks Mario Corchero for the review. Oh, you added Python 3.7 to this issue, but sadly we don't add new features to minor Python versions (like Python 3.7.2) :-( Otherwise, it would mean that depending on the minor version, you may or may get the feature... You will have to workaround MagicMock limitation until Python 3.8 is released.