Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failure with pandas 2.1.1 #71

Closed
iainrussell opened this issue Oct 18, 2023 · 1 comment
Closed

Test failure with pandas 2.1.1 #71

iainrussell opened this issue Oct 18, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@iainrussell
Copy link
Member

What happened?

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]

This test works with pandas 2.0.3, but fails with 2.1.1.
This looks like the reason: pandas-dev/pandas#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

@iainrussell iainrussell added the bug Something isn't working label Oct 18, 2023
iainrussell added a commit that referenced this issue Oct 18, 2023
iainrussell added a commit that referenced this issue Oct 18, 2023
@iainrussell
Copy link
Member Author

Fixed via PR #72

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant