Skip to content

Commit

Permalink
Add test skip for pandas<1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamRJensen committed Feb 12, 2024
1 parent a4c48b6 commit c4a9e8e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pvlib/iotools/solargis.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def get_solargis(latitude, longitude, start, end, variables, api_key,
Notes
-----
Each XMl request is limited to retrieving 31 days of data.
Each XML request is limited to retrieving 31 days of data.
The variable units depends on the time frequency, e.g., the unit for
sub-hourly irradiance data is W/m^2, for hourly data it is Wh/m^2, and for
Expand Down
6 changes: 6 additions & 0 deletions pvlib/tests/iotools/test_solargis.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def hourly_dataframe(hourly_index):
return pd.DataFrame(data={'ghi': ghi, 'dni': dni}, index=hourly_index)


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


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


@pytest.mark.skipif(pd.__version__ < '1.3.0',
reason='pd.read_xml is new as of 1.3.0')
@pytest.mark.remote_data
@pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY)
def test_get_solargis_http_error():
Expand Down

0 comments on commit c4a9e8e

Please sign in to comment.