Skip to content

Commit 61d7efc

Browse files
committed
use atol in meteonorm tests
1 parent 4a64838 commit 61d7efc

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/iotools/test_meteonorm.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,10 @@ def test_get_meteonorm_training(
124124

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

129132

130133
@pytest.mark.remote_data
@@ -304,4 +307,7 @@ def test_get_meteonorm_tmy(
304307
map_variables=False,
305308
url=demo_url)
306309
assert meta == expected_meteonorm_tmy_meta
307-
pd.testing.assert_frame_equal(data.iloc[:12], expected_meteonorm_tmy_data)
310+
# meteonorm API only guarantees similar, not identical, results between
311+
# calls. so we allow a small amount of variation with atol.
312+
pd.testing.assert_frame_equal(data.iloc[:12], expected_meteonorm_tmy_data,
313+
check_exact=False, atol=1)

0 commit comments

Comments
 (0)