Skip to content

Commit ba83fc8

Browse files
test
1 parent b7358de commit ba83fc8

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

test_dtype_utc.py

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-
3+
"""
4+
Created on Sat Dec 17 09:34:47 2016
5+
6+
@author: rodolfoxps
7+
"""
8+
9+
import pandas as pd
10+
import datetime, pytz
11+
from pandas.util.testing import assert_frame_equal
12+
13+
def test_dtype_utc(self):
14+
15+
data=pd.Series( [pd.NaT, pd.NaT, datetime.datetime(2016, 12, 12, 22, 24, 6, 100001, tzinfo=pytz.utc) ] )
16+
17+
filled=data.fillna(method='bfill')
18+
19+
20+
expected=pd.Series([datetime.datetime(2016, 12, 12, 22, 24, 6, 100001, tzinfo=pytz.utc) ,
21+
datetime.datetime(2016, 12, 12, 22, 24, 6, 100001, tzinfo=pytz.utc) ,
22+
datetime.datetime(2016, 12, 12, 22, 24, 6, 100001, tzinfo=pytz.utc) ])
23+
24+
assert_frame_equal(filled, expected)

0 commit comments

Comments
 (0)