Test 'test_sat_compressed_1' fails with this error:
> assert_frame_equal(res[0:1], ref_1[res.columns])
E AssertionError: Attributes of DataFrame.iloc[:, 6] (column name="data_datetime") are different
E
E Attribute "dtype" are different
E [left]: datetime64[ns]
E [right]: datetime64[s]
In our tests, we use various ways to create a reference pandas DataFrame. This particular test uses a way that used to generate an 'ns' datetime, but with the new pandas version it generates an 's' datetime. The solution is simply to specify 'ns' when creating the reference datetimes.
What happened?
Test 'test_sat_compressed_1' fails with this error:
This test works with pandas 2.0.3, but fails with 2.1.1. This looks like the reason: https://github.com/pandas-dev/pandas/pull/52212
In our tests, we use various ways to create a reference pandas DataFrame. This particular test uses a way that used to generate an 'ns' datetime, but with the new pandas version it generates an 's' datetime. The solution is simply to specify 'ns' when creating the reference datetimes.
What are the steps to reproduce the bug?
pytest -s -k test_sat_compressed_1
Version
0.11.0
Platform (OS and architecture)
Linux and MacOS
Relevant log output
No response
Accompanying data
No response
Organisation
ECMWF