Skip to content

Commit

Permalink
TST: Add test for feather I/O with historical out-of-bounds `dateti…
Browse files Browse the repository at this point in the history
…me` values (#60209)

Co-authored-by: Jason Mok <[email protected]>
Co-authored-by: Matthew Roeschke <[email protected]>
  • Loading branch information
3 people authored Nov 7, 2024
1 parent c15d823 commit 909c6da
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pandas/tests/io/test_feather.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""test feather-format compat"""

from datetime import datetime
import zoneinfo

import numpy as np
Expand Down Expand Up @@ -247,3 +248,15 @@ def test_string_inference(self, tmp_path):
data={"a": ["x", "y"]}, dtype=pd.StringDtype(na_value=np.nan)
)
tm.assert_frame_equal(result, expected)

def test_out_of_bounds_datetime_to_feather(self):
# GH#47832
df = pd.DataFrame(
{
"date": [
datetime.fromisoformat("1654-01-01"),
datetime.fromisoformat("1920-01-01"),
],
}
)
self.check_round_trip(df)

0 comments on commit 909c6da

Please sign in to comment.