Skip to content

Commit 39fcb8f

Browse files
committed
update tests to hit new code path
1 parent b273a34 commit 39fcb8f

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

tests/integration/chunkstore/test_chunkstore.py

+19-3
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,15 @@ def test_write_dataframe(chunkstore_lib):
2121

2222

2323
def test_overwrite_dataframe(chunkstore_lib):
24-
df = DataFrame(data={'data': [1, 2, 3]},
24+
df = DataFrame(data={'data': [1, 2, 3, 4]},
2525
index=MultiIndex.from_tuples([(dt(2016, 1, 1), 1),
2626
(dt(2016, 1, 2), 1),
27-
(dt(2016, 1, 3), 1)],
27+
(dt(2016, 1, 3), 1),
28+
(dt(2016, 1, 4), 1)],
2829
names=['date', 'id'])
2930
)
3031

31-
dg = DataFrame(data={'data': [4, 5, 6]},
32+
dg = DataFrame(data={'data': [1, 2, 3]},
3233
index=MultiIndex.from_tuples([(dt(2015, 1, 1), 1),
3334
(dt(2015, 1, 2), 1),
3435
(dt(2015, 1, 3), 1)],
@@ -579,3 +580,18 @@ def helper(chunkstore_lib, chunk_size, name, df, append):
579580

580581
for chunk_size in ['D', 'M', 'Y']:
581582
helper(chunkstore_lib, chunk_size, 'test_monthly_' + chunk_size, df, append)
583+
584+
585+
def test_delete(chunkstore_lib):
586+
df = DataFrame(data={'data': [1, 2, 3]},
587+
index=MultiIndex.from_tuples([(dt(2016, 1, 1), 1),
588+
(dt(2016, 1, 2), 1),
589+
(dt(2016, 1, 3), 1)],
590+
names=['date', 'id'])
591+
)
592+
chunkstore_lib.write('test_df', df, 'D')
593+
read_df = chunkstore_lib.read('test_df')
594+
assert_frame_equal(df, read_df)
595+
assert ('test_df' in chunkstore_lib.list_symbols())
596+
chunkstore_lib.delete('test_df')
597+
assert (chunkstore_lib.list_symbols() == [])

0 commit comments

Comments
 (0)