Skip to content

Commit 710052c

Browse files
authored
add extra test case in the test_constructor_str_infer_reso (#52199)
add extra test case
1 parent 6c50f70 commit 710052c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pandas/tests/scalar/timestamp/test_constructors.py

+6
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ def test_constructor_str_infer_reso(self):
5858
ts = Timestamp("2016 June 3 15:25:01.345")
5959
assert ts.unit == "ms"
6060

61+
ts = Timestamp("300-01-01")
62+
assert ts.unit == "s"
63+
64+
ts = Timestamp("300 June 1:30:01.300")
65+
assert ts.unit == "ms"
66+
6167
def test_constructor_from_iso8601_str_with_offset_reso(self):
6268
# GH#49737
6369
ts = Timestamp("2016-01-01 04:05:06-01:00")

0 commit comments

Comments
 (0)