Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_compare_with_get_data_era5(cutout_era5, tmp_path):
"""
The prepared data should be exactly the same as from the low level function
"""
influx = atlite.datasets.era5.get_data(cutout_era5, 'influx', tmpdir=tmp_path)
assert_allclose(influx.influx_toa, cutout_era5.data.influx_toa, atol=1e-5, rtol=1e-5)
def test_compare_with_get_data_era5():
period = pd.Period(time)
influx = atlite.datasets.era5.get_data(ref.coords, period, 'influx', tmpdir=tmp_dir)
influx = influx.compute()
assert_allclose(influx.influx_toa, ref.data.influx_toa, atol=1e-5, rtol=1e-5)