Lastly, I use patch.object to mock the method in the Square class. The same using pytest: try: from mock import MagicMock except ImportError: ...
確定! 回上一頁