@@ -142,6 +142,8 @@ def assert_warns(warning_class, func, *args, **kw):
142
142
warnings .simplefilter ("always" )
143
143
# Trigger a warning.
144
144
result = func (* args , ** kw )
145
+ w = [e for e in w
146
+ if e .category is not FutureWarning ]
145
147
if hasattr (np , 'VisibleDeprecationWarning' ):
146
148
# Filter out numpy-specific warnings in numpy >= 1.9
147
149
w = [e for e in w
@@ -189,6 +191,9 @@ def assert_warns_message(warning_class, message, func, *args, **kw):
189
191
with warnings .catch_warnings (record = True ) as w :
190
192
# Cause all warnings to always be triggered.
191
193
warnings .simplefilter ("always" )
194
+
195
+ w = [e for e in w
196
+ if e .category is not FutureWarning ]
192
197
if hasattr (np , 'VisibleDeprecationWarning' ):
193
198
# Let's not catch the numpy internal DeprecationWarnings
194
199
warnings .simplefilter ('ignore' , np .VisibleDeprecationWarning )
@@ -266,6 +271,8 @@ def assert_no_warnings(func, *args, **kw):
266
271
warnings .simplefilter ('always' )
267
272
268
273
result = func (* args , ** kw )
274
+ w = [e for e in w
275
+ if e .category is not FutureWarning ]
269
276
if hasattr (np , 'VisibleDeprecationWarning' ):
270
277
# Filter out numpy-specific warnings in numpy >= 1.9
271
278
w = [e for e in w
0 commit comments