Add assert_warns to check for warnings
Make assert_warns API more sensible and add tests
Stop test warnings from being swallowed
Adding assert_warns_such_that

* Can be used either as a context manager or with a callable
* Follows the same (general) pattern as assert_raises_such_that
Merge pull request #190 from aclevy/assert-warnings

Test for warnings raised within a function or `with` block