We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2619ee3 commit 0c8442cCopy full SHA for 0c8442c
pandas/tseries/tests/test_timeseries.py
@@ -1,4 +1,5 @@
1
# pylint: disable-msg=E1101,W0612
2
+import locale
3
import calendar
4
import operator
5
import sys
@@ -5369,7 +5370,12 @@ def test_to_datetime_format_integer(self):
5369
5370
assert_series_equal(result, expected)
5371
5372
def test_to_datetime_format_microsecond(self):
- val = '01-Apr-2011 00:00:01.978'
5373
+
5374
+ # these are locale dependent
5375
+ lang, _ = locale.getlocale()
5376
+ month_abbr = calendar.month_abbr[4]
5377
+ val = '01-{}-2011 00:00:01.978'.format(month_abbr)
5378
5379
format = '%d-%b-%Y %H:%M:%S.%f'
5380
result = to_datetime(val, format=format)
5381
exp = datetime.strptime(val, format)
0 commit comments