Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.

Commit 2133031

Browse files
committed
Expand tests
1 parent 311bfcf commit 2133031

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/test.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,22 @@ def test_persistent_index():
2020
assert_frame_equal(df, df_)
2121
os.remove('tmp.root')
2222

23+
# See what happens if the index has no name
24+
df = pd.DataFrame({'x': [1,2,3]})
25+
df.to_root('tmp.root')
26+
df_ = read_root('tmp.root')
27+
assert_frame_equal(df, df_)
28+
os.remove('tmp.root')
29+
30+
def test_chunked_reading():
31+
df = pd.DataFrame({'x': [1,2,3,4,5,6]})
32+
df.to_root('tmp.root')
33+
34+
count = 0
35+
for df_ in read_root('tmp.root', chunksize=2):
36+
assert(not df_.empty)
37+
count += 1
38+
39+
assert count == 3
40+
os.remove('tmp.root')
41+

0 commit comments

Comments
 (0)