File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change 1616import pytz
1717import pandas as pd
1818import pandas .io .parsers as parsers
19- import pandas .core .tools .datetimes as tools
2019import pandas .util .testing as tm
2120
2221import pandas .io .date_converters as conv
@@ -357,21 +356,13 @@ def test_parse_dates_custom_euroformat(self):
357356
358357 def test_parse_tz_aware (self ):
359358 # See gh-1693
360- import pytz
361359 data = StringIO ("Date,x\n 2012-06-13T01:39:00Z,0.5" )
362360
363361 # it works
364362 result = self .read_csv (data , index_col = 0 , parse_dates = True )
365363 stamp = result .index [0 ]
366364 assert stamp .minute == 39
367- try :
368- assert result .index .tz is pytz .utc
369- except AssertionError :
370- arr = result .index .to_pydatetime ()
371- result = tools .to_datetime (arr , utc = True )[0 ]
372- assert stamp .minute == result .minute
373- assert stamp .hour == result .hour
374- assert stamp .day == result .day
365+ assert result .index .tz is pytz .utc
375366
376367 def test_multiple_date_cols_index (self ):
377368 data = """
You can’t perform that action at this time.
0 commit comments