Skip to content

add extra test case in the test_constructor_str_infer_reso #52199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pandas/tests/scalar/timestamp/test_constructors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down