I am using assert in python. Every time an assert fails I get the failure message which I would have put there to be printed. I was wondering if there is a way to print a custom success message when the assert condition passes? I am using py.test framework. for instance: assert self.clnt.stop_io()==1, "IO stop failed" for the above assert I get message "IO stop failed" if assert fails but I am looking to have "IO stop succeeded" if assert passes. something like this: assert self.clnt.stop_io()==1, "IO stop failed", "IO stop succeeded" Continue reading...