Skip to content

Commit 770bcd1

Browse files
authored
Fix meteonorm tests, again (#2623)
* update metadata checks * apply same fix to TMY test
1 parent b1f48bb commit 770bcd1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/iotools/test_meteonorm.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ def test_get_meteonorm_training(
122122
time_step='1h',
123123
url=demo_url)
124124

125-
assert meta == expected_meta
125+
assert meta.items() >= expected_meta.items() # check stable subset
126+
for key in ['version', 'commit']:
127+
assert key in meta # value changes, so only check presence
126128
pd.testing.assert_index_equal(data.index, expected_meteonorm_index)
127129
# meteonorm API only guarantees similar, not identical, results between
128130
# calls. so we allow a small amount of variation with atol.
@@ -306,7 +308,9 @@ def test_get_meteonorm_tmy(
306308
interval_index=True,
307309
map_variables=False,
308310
url=demo_url)
309-
assert meta == expected_meteonorm_tmy_meta
311+
assert meta.items() >= expected_meteonorm_tmy_meta.items()
312+
for key in ['version', 'commit']:
313+
assert key in meta # value changes, so only check presence
310314
# meteonorm API only guarantees similar, not identical, results between
311315
# calls. so we allow a small amount of variation with atol.
312316
pd.testing.assert_frame_equal(data.iloc[:12], expected_meteonorm_tmy_data,

0 commit comments

Comments
 (0)