Skip to content

Commit

Permalink
Fixed test for linux musl
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylvain MARIE committed Apr 4, 2024
1 parent fc03926 commit 03dfc52
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pandas/tests/scalar/timestamp/test_formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
import pytz # a test below uses pytz but only inside a `eval` call
from pytz.exceptions import NonExistentTimeError

from pandas.compat import is_platform_linux
from pandas.compat import (
ISMUSL,
is_platform_linux,
)

from pandas import Timestamp
import pandas._testing as tm
Expand Down Expand Up @@ -224,7 +227,7 @@ 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
if is_platform_linux():
if is_platform_linux() and not ISMUSL:
assert stamp.strftime("%Y") == "2", f"Actual: {stamp.strftime('%Y')}"
else:
assert stamp.strftime("%Y") == "0002", f"Actual: {stamp.strftime('%Y')}"
Expand Down

0 comments on commit 03dfc52

Please sign in to comment.