From 2101b0d2ad319a9519d9fcbac3a6a5631e70e24b Mon Sep 17 00:00:00 2001 From: Natalia Mokeeva Date: Sat, 25 Mar 2023 15:06:07 +0100 Subject: [PATCH] add extra test case --- pandas/tests/scalar/timestamp/test_constructors.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandas/tests/scalar/timestamp/test_constructors.py b/pandas/tests/scalar/timestamp/test_constructors.py index ca0796e55f28d..7e4002dc3a0cf 100644 --- a/pandas/tests/scalar/timestamp/test_constructors.py +++ b/pandas/tests/scalar/timestamp/test_constructors.py @@ -58,6 +58,12 @@ def test_constructor_str_infer_reso(self): ts = Timestamp("2016 June 3 15:25:01.345") assert ts.unit == "ms" + ts = Timestamp("300-01-01") + assert ts.unit == "s" + + ts = Timestamp("300 June 1:30:01.300") + assert ts.unit == "ms" + def test_constructor_from_iso8601_str_with_offset_reso(self): # GH#49737 ts = Timestamp("2016-01-01 04:05:06-01:00")