Yelp/Testify — pull request #173 by blampe (2013-06-12 18:52:35+00:00)
Title: make test case instances report correct test results

```python
# Sometimes, test cases want to take further action based on
# results, e.g. further clean-up or reporting if a test method
# fails. (Yelp's Selenium test cases do this.)
test_method.im_self.test_result = result
```
Check it: we're storing the result of the test on the method itself, but `im_self` is the TestCase instance the method is bound to, so all test methods in the suite share the same `im_self`, and therefore each test's 'result' is just going to be whatever the last result was in the suite. See http://docs.python.org/2/reference/datamodel.html ('User-defined methods') for more details.

I'm preserving this behavior for backwards compatibility, but the correct behavior is now encapsulated in the `TestCase.results()` method.

This isn't Python 3 forward-compatible (we could use `__func__`) but the existing line wasn't, either. I haven't checked Python 2.5 compatibility but I wouldn't expect any issues.