Improve py.test support by allowing arguments to be passed to test
function.

Ensure tests which are supposed to raise warnings do, by using the
warnings.catch_warning context manager.
Merge pull request #30 from pbrady/improve_warnings

Improve py.test support