pytest-mock

Pytest模拟程序未能找到路径

问题是我更改了底层代码,所以它使用Path().is_file测试文件是否存在。现在我需要模拟Path().is_file,使其返回True。