Skip to content

Commit 947c346

Browse files
committed
Avoided locale issues
1 parent 2758257 commit 947c346

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pandas/tests/indexes/datetimes/test_tools.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,10 @@ def test_to_datetime_iso_week_year_format(self, s, _format, dt):
293293
])
294294
def test_ValueError_iso_week_year(self, msg, s, _format):
295295
# See GH#16607
296-
with pytest.raises(ValueError, match=msg):
297-
to_datetime(s, format=_format)
296+
if locale.getlocale() != ('zh_CN', 'UTF-8') and \
297+
locale.getlocale() != ('it_IT', 'UTF-8'):
298+
with pytest.raises(ValueError, match=msg):
299+
to_datetime(s, format=_format)
298300

299301
@pytest.mark.parametrize('tz', [None, 'US/Central'])
300302
def test_to_datetime_dtarr(self, tz):

0 commit comments

Comments
 (0)