Skip to content

Commit

Permalink
Trying to debug datetime.strftime on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylvain MARIE committed Apr 3, 2024
1 parent 103d9cf commit 478ea4e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pandas/tests/scalar/timestamp/test_formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,10 @@ def test_timestamp_repr_strftime_small_year_date(self):
stamp = Timestamp("0002-01-01")
assert repr(stamp) == "Timestamp('2-01-01 00:00:00')"

# Make sure we have zero-padding consistent with python strftime
assert stamp.strftime("%Y-%y") == "0002-02"
str_tmp, loc_dt_s = convert_strftime_format("%Y-%y", target="datetime")
assert stamp._fast_strftime(str_tmp, loc_dt_s) == "0002-02"
# Make sure we have zero-padding, consistent with python strftime
assert stamp.strftime("%Y") == "0002", f"actual: {stamp.strftime('%Y')}"
str_tmp, loc_dt_s = convert_strftime_format("%Y", target="datetime")
assert stamp._fast_strftime(str_tmp, loc_dt_s) == "0002"

def test_timestamp_repr_strftime_negative_date(self):
stamp = Timestamp("-0020-01-01")
Expand Down

0 comments on commit 478ea4e

Please sign in to comment.