add test for file with differing column lengths

This commit is contained in:
iuvbio 2019-06-06 12:00:28 +02:00
parent 493d041685
commit d744ad526c
2 changed files with 7 additions and 0 deletions

Binary file not shown.

View File

@ -10,6 +10,7 @@ rsc = os.path.join(root, "rsc")
header_file = "example_headers.ods"
no_header_file = "example_no_headers.ods"
col_len_file = "example_col_lengths.ods"
class TestOdsReader(object):
@ -45,3 +46,9 @@ class TestOdsReader(object):
df = read_ods(path, 1, headers=False, columns=columns)
assert list(df.columns) == columns
assert len(df) == 10
def test_header_file_col_len(self):
path = os.path.join(rsc, col_len_file)
df = read_ods(path, 1)
assert isinstance(df, pd.DataFrame)
assert len(df) == 10