File tree 1 file changed +1
-10
lines changed
1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change 16
16
import pytz
17
17
import pandas as pd
18
18
import pandas .io .parsers as parsers
19
- import pandas .core .tools .datetimes as tools
20
19
import pandas .util .testing as tm
21
20
22
21
import pandas .io .date_converters as conv
@@ -357,21 +356,13 @@ def test_parse_dates_custom_euroformat(self):
357
356
358
357
def test_parse_tz_aware (self ):
359
358
# See gh-1693
360
- import pytz
361
359
data = StringIO ("Date,x\n 2012-06-13T01:39:00Z,0.5" )
362
360
363
361
# it works
364
362
result = self .read_csv (data , index_col = 0 , parse_dates = True )
365
363
stamp = result .index [0 ]
366
364
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
375
366
376
367
def test_multiple_date_cols_index (self ):
377
368
data = """
You can’t perform that action at this time.
0 commit comments