Did you wanna set `record=True`?

http://docs.python.org/2/library/warnings.html#testing-warnings