擅长:python、mysql、java
<p>我只使用过一个,但是我用Michael Foord的Mock:<a href="http://www.voidspace.org.uk/python/mock/" rel="noreferrer">http://www.voidspace.org.uk/python/mock/</a>得到了很好的结果。</p>
<p>迈克尔的介绍比我说得好:</p>
<blockquote>
<p>There are already several Python mocking libraries available, so why another one?</p>
<p>Most mocking libraries follow the 'record -> replay' pattern of mocking. I prefer the 'action -> assertion' pattern, which is more readable and intuitive particularly when working with the Python unittest module.</p>
<p>...</p>
<p>It also provides utility functions / objects to assist with testing, particularly monkey patching.</p>
</blockquote>