Skip to content

Commit 6757906

Browse files
authored
Merge pull request #1967 from ocefpaf/fix_tests
Fix tests
2 parents 66726fd + 389b85a commit 6757906

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/plugins/test_time_slider_choropleth.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,27 @@
55
"""
66

77
import json
8+
import sys
89

910
import numpy as np
1011
import pandas as pd
12+
import pytest
1113
from branca.colormap import linear
1214

1315
import folium
1416
from folium.plugins import TimeSliderChoropleth
1517
from folium.utilities import normalize
1618

1719

20+
@pytest.mark.xfail(sys.version_info[0:2] == (3, 8), reason="too modern for py38")
1821
def test_timedynamic_geo_json():
1922
"""
2023
tests folium.plugins.TimeSliderChoropleth
2124
"""
25+
import geodatasets
2226
import geopandas as gpd
2327

24-
assert "naturalearth_lowres" in gpd.datasets.available
25-
datapath = gpd.datasets.get_path("naturalearth_lowres")
28+
datapath = geodatasets.get_path("naturalearth land")
2629
gdf = gpd.read_file(datapath)
2730

2831
"""
@@ -32,7 +35,7 @@ def test_timedynamic_geo_json():
3235
datetime.strftime('%s') on Windows just generates date and not timestamp so avoid.
3336
"""
3437
n_periods = 3
35-
dt_range = pd.Series(pd.date_range("2001-08-1", periods=n_periods, freq="M"))
38+
dt_range = pd.Series(pd.date_range("2001-08-1", periods=n_periods, freq="ME"))
3639
dt_index = [f"{dt.timestamp():.0f}" for dt in dt_range]
3740

3841
styledata = {}

0 commit comments

Comments
 (0)