def they_can_be_cleared(self): clear_expectations() assert_raises(AttributeError, lambda: expect("potato").is_a_potato)
def teardown(self): clear_expectations()
def they_can_be_cleared(self): clear_expectations() assert_raises(AttributeError, lambda: expect('potato').is_a_potato)
def they_can_be_cleared(): clear_expectations() with pytest.raises(AttributeError): expect('potato').is_a_potato
def teardown(): clear_expectations()