2
是什么蟒蛇模拟和魔法模拟之间的差异,因为我能看到python mock和magic mock有什么区别?
>>> dir(Mock()) == dir(MagicMock())
True
时使用模拟OBJ &时使用MagicMock OBJ?
是什么蟒蛇模拟和魔法模拟之间的差异,因为我能看到python mock和magic mock有什么区别?
>>> dir(Mock()) == dir(MagicMock())
True
时使用模拟OBJ &时使用MagicMock OBJ?
MagicMock is a subclass of Mock with default implementations of many magic methods. You can use MagicMock without having to configure the magic methods yourself.
我想上面的代码是最神奇的方法会影响到你的模拟自动
查阅本指南,它可以帮助你Magic Methods
和官方文档https://docs.python.org/2/reference/datamodel.html#special-method-names
是什么那些许多神奇的方法?我可以使用出组态? – Vb407