示例#1
0
 def _(self):
     some_instance = SomeClass()
     with attach_spy(some_instance, "some_method"):
         expect(some_instance.some_method).was_not_called()
示例#2
0
 def _(self):
     some_instance = SomeClass()
     with attach_spy(some_instance, "some_method"):
         some_instance.some_method()
         expect_assertion_error(lambda: expect(some_instance.some_method).was_not_called())
示例#3
0
 def _(self):
     some_instance = SomeClass()
     with attach_spy(some_instance, "some_method"):
         expect(some_instance.some_method).was_not_called()
         some_instance.some_method("anything", ["can"], go="here")
         expect(some_instance.some_method).was_called_with("anything", ["can"], go="here")