Skip to content

Commit 909c6da

Browse files
jasonmokkJason Mokmroeschke
authored
TST: Add test for feather I/O with historical out-of-bounds datetime values (pandas-dev#60209)
Co-authored-by: Jason Mok <[email protected]> Co-authored-by: Matthew Roeschke <[email protected]>
1 parent c15d823 commit 909c6da

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

pandas/tests/io/test_feather.py

+13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""test feather-format compat"""
22

3+
from datetime import datetime
34
import zoneinfo
45

56
import numpy as np
@@ -247,3 +248,15 @@ def test_string_inference(self, tmp_path):
247248
data={"a": ["x", "y"]}, dtype=pd.StringDtype(na_value=np.nan)
248249
)
249250
tm.assert_frame_equal(result, expected)
251+
252+
def test_out_of_bounds_datetime_to_feather(self):
253+
# GH#47832
254+
df = pd.DataFrame(
255+
{
256+
"date": [
257+
datetime.fromisoformat("1654-01-01"),
258+
datetime.fromisoformat("1920-01-01"),
259+
],
260+
}
261+
)
262+
self.check_round_trip(df)

0 commit comments

Comments
 (0)