作为单元测试的一部分(使用 pytest),我想检查下面的方法“my_method”是否被调用。
def f(): my_instance = MyClass() my_instance.my_method()
我有什么办法可以做到这一点?
FFIVE
白衣非少年
相关分类