From afc64639b5ba9c24513f8393dd545c076ee1cc28 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Thu, 13 Jun 2024 13:40:51 +0200 Subject: [PATCH 1/3] fix tests --- tests/plugins/test_time_slider_choropleth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/plugins/test_time_slider_choropleth.py b/tests/plugins/test_time_slider_choropleth.py index 4d21db417..0756ae4f4 100644 --- a/tests/plugins/test_time_slider_choropleth.py +++ b/tests/plugins/test_time_slider_choropleth.py @@ -32,7 +32,7 @@ def test_timedynamic_geo_json(): datetime.strftime('%s') on Windows just generates date and not timestamp so avoid. """ n_periods = 3 - dt_range = pd.Series(pd.date_range("2001-08-1", periods=n_periods, freq="M")) + dt_range = pd.Series(pd.date_range("2001-08-1", periods=n_periods, freq="ME")) dt_index = [f"{dt.timestamp():.0f}" for dt in dt_range] styledata = {} From 5abfc77313333f8efdc03e5fcaebe27d638742bc Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Thu, 13 Jun 2024 15:24:41 +0200 Subject: [PATCH 2/3] skip 38 --- tests/plugins/test_time_slider_choropleth.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/plugins/test_time_slider_choropleth.py b/tests/plugins/test_time_slider_choropleth.py index 0756ae4f4..021fc4cae 100644 --- a/tests/plugins/test_time_slider_choropleth.py +++ b/tests/plugins/test_time_slider_choropleth.py @@ -5,9 +5,11 @@ """ import json +import sys import numpy as np import pandas as pd +import pytest from branca.colormap import linear import folium @@ -15,6 +17,7 @@ from folium.utilities import normalize +@pytest.mark.xfail(sys.version_info[0:2] == (3, 8), reason="too modern for py38") def test_timedynamic_geo_json(): """ tests folium.plugins.TimeSliderChoropleth From 389b85a9c4d64583ee567965e4c257d2dc7db167 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Thu, 13 Jun 2024 15:58:18 +0200 Subject: [PATCH 3/3] fix geopandas 1.0 deprecation --- tests/plugins/test_time_slider_choropleth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/plugins/test_time_slider_choropleth.py b/tests/plugins/test_time_slider_choropleth.py index 021fc4cae..fcc1be9de 100644 --- a/tests/plugins/test_time_slider_choropleth.py +++ b/tests/plugins/test_time_slider_choropleth.py @@ -22,10 +22,10 @@ def test_timedynamic_geo_json(): """ tests folium.plugins.TimeSliderChoropleth """ + import geodatasets import geopandas as gpd - assert "naturalearth_lowres" in gpd.datasets.available - datapath = gpd.datasets.get_path("naturalearth_lowres") + datapath = geodatasets.get_path("naturalearth land") gdf = gpd.read_file(datapath) """