Yelp/Testify — pull request #190 by aclevy (2013-10-07 03:08:00+00:00)
Title: Test for warnings raised within a function or `with` block

This branch adds an `assert_warns` method to the `testify.assertions` module. This allows the following syntax:

```python
class MyTest(T.TestCase):
def test_some_method_generates_a_warning(self):
T.assert_warns(UserWarning, some_method, *args, **kwargs)

def test_warning_generated_within_context_manager(self):
with T.assert_warns():
warnings.warn('Hey!')
```