Skip to content

Commit

Permalink
Fix flaky test_to_from_pandas
Browse files Browse the repository at this point in the history
  • Loading branch information
eivindjahren authored and berland committed Sep 2, 2024
1 parent 65e96b9 commit 3712d21
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions python/tests/rd_tests/test_rd_sum.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,12 @@ def test_to_from_pandas(summary):
"TEST", baseline, dims=(smspec.nx, smspec.ny, smspec.nz)
).pandas_frame()

# round to hours
roundtrip.index = roundtrip.index.round(freq="H")
baseline.index = baseline.index.round(freq="H")
# Round to days because of precision loss due
# to file storing time as float32 days or hours since
# start date which is converted to float64 seconds internally
# and then to datetime64 in pandas
roundtrip.index = roundtrip.index.round(freq="D")
baseline.index = baseline.index.round(freq="D")

assert_frame_equal(
roundtrip,
Expand Down

0 comments on commit 3712d21

Please sign in to comment.