title: run code when unit test assert fails
body: <p>I'm using <code>assertEquals()</code> from <code>unittest.TestCase</code>. What I want to do now is to call a function and do something there when the assertion fails, I wonder if there's a way of doing this?</p>