Skip to content

Commit 01a38de

Browse files
committed
test: exhibit issue with naive stamps
With pandas 0.25 we get back utc stuff. see pandas-dev/pandas#29706
1 parent e536bee commit 01a38de

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/test_api.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,22 @@
1010
)
1111

1212

13+
def test_naive(client, engine, tsh):
14+
series_in = genserie(pd.Timestamp('2018-1-1'), 'H', 3)
15+
client.update('test', series_in, 'Babar',
16+
insertion_date=utcdt(2019, 1, 1))
17+
assert client.exists('test')
18+
19+
# now let's get it back
20+
ts = client.get('test')
21+
assert_df("""
22+
2018-01-01 00:00:00+00:00 0.0
23+
2018-01-01 01:00:00+00:00 1.0
24+
2018-01-01 02:00:00+00:00 2.0
25+
""", ts)
26+
assert ts.index.dtype.tz.zone == 'UTC'
27+
28+
1329
def test_base(client, engine, tsh):
1430
assert repr(client) == "tshistory-http-client(uri='http://test-uri')"
1531

0 commit comments

Comments
 (0)