Skip to content

Commit

Permalink
Attempt to fix on MUSL
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylvain MARIE committed Apr 4, 2024
1 parent a21837c commit fc03926
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pandas/tests/scalar/timestamp/test_formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,11 @@ def test_timestamp_repr_strftime_small_year_date(self):

# Make sure we have zero-padding, consistent with python strftime doc
# Note: current behaviour of strftime with %Y is OS-dependent
assert stamp.strftime("%Y") == "2" if is_platform_linux() else "0002"
if is_platform_linux():
assert stamp.strftime("%Y") == "2", f"Actual: {stamp.strftime('%Y')}"
else:
assert stamp.strftime("%Y") == "0002", f"Actual: {stamp.strftime('%Y')}"

# This is not OS-dependent
str_tmp, loc_dt_s = convert_strftime_format("%Y", target="datetime")
assert stamp._fast_strftime(str_tmp, loc_dt_s) == "0002"
Expand Down

0 comments on commit fc03926

Please sign in to comment.