Skip to content

Commit 8676d1d

Browse files
committed
Convert notes about some OpenDocument tests to comments
1 parent fa3f968 commit 8676d1d

File tree

1 file changed

+9
-18
lines changed

1 file changed

+9
-18
lines changed

pandas/tests/io/test_excel.py

+9-18
Original file line numberDiff line numberDiff line change
@@ -2604,26 +2604,20 @@ def test_read_types(self):
26042604
tm.assert_equal(sheet, expected)
26052605

26062606
def test_read_invalid_types_raises(self):
2607-
"""Make sure we throw an exception when encountering a new value-type
2608-
2609-
I had to manually create an invalid ods file by directly
2610-
editing the extracted xml. So it probably won't open in
2611-
LibreOffice correctly.
2612-
"""
2607+
# the invalid_value_type.ods required manually editing
2608+
# of the included content.xml file
26132609
with pytest.raises(ValueError,
26142610
match="Unrecognized type awesome_new_type"):
26152611
self.get_exceldf(
26162612
'invalid_value_type', '.ods', header=None, engine='odf')
26172613

26182614
def test_read_lower_diagonal(self):
2619-
"""TextParser failed when given an irregular list of lists
2615+
# Make sure we can parse:
2616+
# 1
2617+
# 2 3
2618+
# 4 5 6
2619+
# 7 8 9 10
26202620

2621-
Make sure we can parse:
2622-
1
2623-
2 3
2624-
4 5 6
2625-
7 8 9 10
2626-
"""
26272621
sheet = self.get_exceldf(
26282622
'lowerdiagonal', '.ods', 'Sheet1',
26292623
index_col=None, header=None, engine='odf')
@@ -2651,10 +2645,9 @@ def test_read_headers(self):
26512645
assert pd.isnull(value)
26522646

26532647
def test_read_writer_table(self):
2654-
"""ODF reuses the same table tags in Writer and Presentation files
2648+
# Also test reading tables from an text OpenDocument file
2649+
# (.odt)
26552650

2656-
Test reading a table out of a text document
2657-
"""
26582651
table = self.get_exceldf(
26592652
'writertable', '.odt', 'Table1', index_col=0, engine='odf')
26602653

@@ -2682,8 +2675,6 @@ def test_blank_row_repeat(self):
26822675
assert not pd.isnull(table['value'][11])
26832676

26842677
def test_runlengthencoding(self):
2685-
"""Calc will use repeat when adjacent columns have the same value.
2686-
"""
26872678
sheet = self.get_exceldf(
26882679
'runlengthencoding', '.ods', 'Sheet1', header=None, engine='odf')
26892680
assert sheet.shape == (5, 3)

0 commit comments

Comments
 (0)