Skip to content

Commit c4a9e8e

Browse files
committed
Add test skip for pandas<1.3.0
1 parent a4c48b6 commit c4a9e8e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

pvlib/iotools/solargis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def get_solargis(latitude, longitude, start, end, variables, api_key,
8888
8989
Notes
9090
-----
91-
Each XMl request is limited to retrieving 31 days of data.
91+
Each XML request is limited to retrieving 31 days of data.
9292
9393
The variable units depends on the time frequency, e.g., the unit for
9494
sub-hourly irradiance data is W/m^2, for hourly data it is Wh/m^2, and for

pvlib/tests/iotools/test_solargis.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ def hourly_dataframe(hourly_index):
3232
return pd.DataFrame(data={'ghi': ghi, 'dni': dni}, index=hourly_index)
3333

3434

35+
@pytest.mark.skipif(pd.__version__ < '1.3.0',
36+
reason='pd.read_xml is new as of 1.3.0')
3537
@pytest.mark.remote_data
3638
@pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY)
3739
def test_get_solargis(hourly_dataframe):
@@ -43,6 +45,8 @@ def test_get_solargis(hourly_dataframe):
4345
assert_frame_equal(data, hourly_dataframe)
4446

4547

48+
@pytest.mark.skipif(pd.__version__ < '1.3.0',
49+
reason='pd.read_xml is new as of 1.3.0')
4650
@pytest.mark.remote_data
4751
@pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY)
4852
def test_get_solargis_utc_start_timestamp(hourly_index_start_utc):
@@ -57,6 +61,8 @@ def test_get_solargis_utc_start_timestamp(hourly_index_start_utc):
5761
assert_index_equal(data.index, hourly_index_start_utc)
5862

5963

64+
@pytest.mark.skipif(pd.__version__ < '1.3.0',
65+
reason='pd.read_xml is new as of 1.3.0')
6066
@pytest.mark.remote_data
6167
@pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY)
6268
def test_get_solargis_http_error():

0 commit comments

Comments
 (0)