Fix test with pytest
@@ -358,8 +358,7 @@ def test_deprecation_warning():
This test may catch warnings on importing other libraries.
"""
- with warnings.catch_warnings(record=True) as caught_warnings:
- warnings.simplefilter("always")
+ with pytest.warns(None) as caught_warnings:
importlib.reload(folium)
expected_warning_count = 1 if sys.version_info < (3, 0) else 0
assert(len(caught_warnings) == expected_warning_count)
