File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -358,12 +358,11 @@ def test_deprecation_warning():
358
358
359
359
This test may catch warnings on importing other libraries.
360
360
"""
361
- with warnings .catch_warnings (record = True ) as caught_warnings :
362
- warnings .simplefilter ("always" )
361
+ with pytest .warns (None ) as caught_warnings :
363
362
importlib .reload (folium )
364
- expected_warning_count = 1 if sys .version_info < (3 , 0 ) else 0
365
- assert (len (caught_warnings ) == expected_warning_count )
366
- if expected_warning_count == 1 :
367
- w = caught_warnings [0 ]
368
- assert issubclass (w .category , PendingDeprecationWarning )
369
- assert str (w .message ).startswith ('folium will stop working with' )
363
+ expected_warning_count = 1 if sys .version_info < (3 , 0 ) else 0
364
+ assert (len (caught_warnings ) == expected_warning_count )
365
+ if expected_warning_count == 1 :
366
+ w = caught_warnings [0 ]
367
+ assert issubclass (w .category , PendingDeprecationWarning )
368
+ assert str (w .message ).startswith ('folium will stop working with' )
You can’t perform that action at this time.
0 commit comments