pypy/module/time/test/apptest_time.py::test_strftime_nonascii
@pytest.mark.skipif(sys.platform=="win32", reason='fails on win32')
def test_strftime_nonascii():
import time
import _locale
prev_loc = _locale.setlocale(_locale.LC_TIME)
try:
_locale.setlocale(_locale.LC_TIME, "fr_CH")
except _locale.Error:
skip("unsupported locale LC_TIME=fr_CH")
try:
s = time.strftime('%B.', time.localtime(192039127))
# I am unsure, but I think that this fails because decoding of
# the result isn't done in the fr_CH locale. There is no code
# to grab the LC_TIME locale specifically, which is the one
# used by strftime().
> assert s == "f\xe9vrier."
E (application-level) AssertionError: assert 'février.' == 'février.'
module/time/test/apptest_time.py:522: AssertionError
builder: own-macos-arm64 build #1201
test: pypy/module/time/test/apptest_time/py/test_strftime_nonascii