Skip to content

Commit 4d21d99

Browse files
authored
Fix failing Meteonorm tests (#2548)
1 parent a994fb7 commit 4d21d99

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

tests/iotools/test_meteonorm.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ def demo_api_key():
1414
# lat=-3, lon=-60 (Brazil)
1515
# lat=51, lon=-114 (Canada)
1616
# lat=24, lon=33 (Egypt)
17-
return 'demo0000-0000-0000-0000-000000000000'
17+
demo_api_key = 'demo0000-0000-0000-0000-000000000000'
18+
return demo_api_key
1819

1920

2021
@pytest.fixture
2122
def demo_url():
22-
return 'https://demo.meteonorm.com/v1/'
23+
demo_url = 'https://demo.meteonorm.com/v1/'
24+
return demo_url
2325

2426

2527
@pytest.fixture
@@ -69,11 +71,11 @@ def expected_meteonorm_data():
6971
[0.0, 0.0],
7072
[0.0, 0.0],
7173
[0.0, 0.0],
72-
[2.5, 2.68309898],
73-
[77.5, 77.47671591],
74-
[165.0, 164.98906908],
75-
[210.75, 210.7458778],
76-
[221.0, 220.99278214],
74+
[2.5, 2.68],
75+
[77.5, 77.47],
76+
[165.0, 164.98],
77+
[210.75, 210.74],
78+
[221.0, 220.99],
7779
]
7880
index = pd.date_range('2023-01-01 00:30', periods=12, freq='1h', tz='UTC')
7981
index.freq = None
@@ -263,13 +265,13 @@ def expected_meteonorm_tmy_data():
263265
[0.],
264266
[0.],
265267
[0.],
266-
[9.],
267-
[8.4],
268-
[86.6],
269-
[110.5],
268+
[9.06],
269+
[8.43],
270+
[86.63],
271+
[110.44],
270272
]
271273
index = pd.date_range(
272-
'2005-01-01', periods=12, freq='1h', tz=3600)
274+
'2030-01-01', periods=12, freq='1h', tz=3600)
273275
index.freq = None
274276
interval_index = pd.IntervalIndex.from_arrays(
275277
index, index + pd.Timedelta(hours=1), closed='left')

0 commit comments

Comments
 (0)