Skip to content

Commit 6bcfc46

Browse files
mroeschkejreback
authored andcommitted
Fix failing dateutil test (#22354)
1 parent 86e8f23 commit 6bcfc46

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

pandas/tests/series/test_datetime_values.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
date_range, period_range, timedelta_range,
1616
PeriodIndex, DatetimeIndex, TimedeltaIndex)
1717
import pandas.core.common as com
18-
19-
import dateutil
18+
from pandas._libs.tslibs.timezones import maybe_get_tz
2019

2120
from pandas.util.testing import assert_series_equal
2221
import pandas.util.testing as tm
@@ -464,10 +463,7 @@ def test_datetime_understood(self):
464463

465464
def test_dt_timetz_accessor(self, tz_naive_fixture):
466465
# GH21358
467-
if tz_naive_fixture is not None:
468-
tz = dateutil.tz.gettz(tz_naive_fixture)
469-
else:
470-
tz = None
466+
tz = maybe_get_tz(tz_naive_fixture)
471467

472468
dtindex = pd.DatetimeIndex(['2014-04-04 23:56', '2014-07-18 21:24',
473469
'2015-11-22 22:14'], tz=tz)

0 commit comments

Comments
 (0)