from mock import MagicMock, patch m = MagicMock() # mock test 函数,返回值1 m.test = MagicMock(return_value=1) # 调用test 函数 m.test() ...
確定! 回上一頁