There are already several Python mocking libraries available, so why another one?
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.
...
It also provides utility functions / objects to assist with testing, particularly monkey patching.
Mox,来自Google
来自古斯塔沃·尼梅耶的Mocker。
它不是完美的,但它非常强大和灵活。
我只使用过一个,但是我用Michael Foord的Mock:http://www.voidspace.org.uk/python/mock/得到了很好的结果。
迈克尔的介绍比我说得好:
相关问题 更多 >
编程相关推荐