因此,我也想使用pytest 扩展pytest-mock。在下面,我使用pytest + pytest-mock 粘贴了一个示例测试用例: def test_find_foo(mocker): mocker.patch('shutil.which', ...
確定! 回上一頁