Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions tests/iotools/test_meteonorm.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ def test_get_meteonorm_training(

assert meta == expected_meta
pd.testing.assert_index_equal(data.index, expected_meteonorm_index)
pd.testing.assert_frame_equal(data.iloc[:12], expected_meteonorm_data)
# meteonorm API only guarantees similar, not identical, results between
# calls. so we allow a small amount of variation with atol.
pd.testing.assert_frame_equal(data.iloc[:12], expected_meteonorm_data,
check_exact=False, atol=1)


@pytest.mark.remote_data
Expand Down Expand Up @@ -304,4 +307,7 @@ def test_get_meteonorm_tmy(
map_variables=False,
url=demo_url)
assert meta == expected_meteonorm_tmy_meta
pd.testing.assert_frame_equal(data.iloc[:12], expected_meteonorm_tmy_data)
# meteonorm API only guarantees similar, not identical, results between
# calls. so we allow a small amount of variation with atol.
pd.testing.assert_frame_equal(data.iloc[:12], expected_meteonorm_tmy_data,
check_exact=False, atol=1)
3 changes: 2 additions & 1 deletion tests/iotools/test_sodapro.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@

index_verbose = pd.date_range('2020-06-01 12', periods=4, freq='1min',
tz='UTC')
index_monthly = pd.date_range('2020-01-01', periods=4, freq='1ME')
index_monthly = pd.to_datetime(['2020-01-31', '2020-02-29', '2020-03-31',
'2020-04-30'])


dtypes_mcclear_verbose = [
Expand Down
3 changes: 2 additions & 1 deletion tests/iotools/test_solargis.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ def test_get_solargis_utc_start_timestamp(hourly_index_start_utc):
@pytest.mark.flaky(reruns=RERUNS, reruns_delay=RERUNS_DELAY)
def test_get_solargis_http_error():
# Test if HTTPError is raised if date outside range is specified
with pytest.raises(requests.HTTPError, match="data coverage"):
match = r"request fromDate .* is before the available start date"
with pytest.raises(requests.HTTPError, match=match):
_, _ = pvlib.iotools.get_solargis(
latitude=48.61259, longitude=20.827079,
start='1920-01-01', end='1920-01-01', # date outside range
Expand Down
Loading