In all_warnings context manager, return warnings for examination

This commit is contained in:
Stefan van der Walt
2014-04-27 02:16:41 +02:00
parent 337f3d175f
commit 8fdd5a270d
+2 -2
View File
@@ -55,6 +55,6 @@ def all_warnings():
except AttributeError:
pass
with warnings.catch_warnings():
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
yield
yield w