Skip to content

Grab timezones appropriately in timetz test #22354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 16, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions pandas/tests/series/test_datetime_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
date_range, period_range, timedelta_range,
PeriodIndex, DatetimeIndex, TimedeltaIndex)
import pandas.core.common as com

import dateutil
from pandas._libs.tslibs.timezones import maybe_get_tz

from pandas.util.testing import assert_series_equal
import pandas.util.testing as tm
Expand Down Expand Up @@ -464,10 +463,7 @@ def test_datetime_understood(self):

def test_dt_timetz_accessor(self, tz_naive_fixture):
# GH21358
if tz_naive_fixture is not None:
tz = dateutil.tz.gettz(tz_naive_fixture)
else:
tz = None
tz = maybe_get_tz(tz_naive_fixture)

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