Skip to content

Commit 68b0e7e

Browse files
committed
unit tests
1 parent a6ee251 commit 68b0e7e

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/nested_pandas/nestedframe/test_io.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,25 @@ def test_read_parquet():
2727
assert nf.lincc.nest.fields == ["band", "frameworks"]
2828

2929

30+
def test_read_parquet_list():
31+
"""Test reading a parquet file with no columns specified"""
32+
# Load in the example file
33+
single_file_nf = read_parquet("tests/test_data/nested.parquet")
34+
nf = read_parquet(["tests/test_data/nested.parquet", "tests/test_data/nested.parquet"])
35+
36+
# Check the columns
37+
assert nf.columns.tolist() == ["a", "flux", "nested", "lincc"]
38+
39+
# Make sure nested columns were recognized
40+
assert nf.nested_columns == ["nested", "lincc"]
41+
42+
# Check the nested columns
43+
assert nf.nested.nest.fields == ["t", "flux", "band"]
44+
assert nf.lincc.nest.fields == ["band", "frameworks"]
45+
46+
assert len(nf) == 2 * len(single_file_nf)
47+
48+
3049
def test_read_parquet_directory():
3150
"""Test reading a parquet file with no columns specified"""
3251
# Load in the example file

0 commit comments

Comments
 (0)