def _(self): some_instance = SomeClass() with attach_spy(some_instance, "some_method"): expect(some_instance.some_method).was_not_called()
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())
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")