@@ -2604,26 +2604,20 @@ def test_read_types(self):
2604
2604
tm .assert_equal (sheet , expected )
2605
2605
2606
2606
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
2613
2609
with pytest .raises (ValueError ,
2614
2610
match = "Unrecognized type awesome_new_type" ):
2615
2611
self .get_exceldf (
2616
2612
'invalid_value_type' , '.ods' , header = None , engine = 'odf' )
2617
2613
2618
2614
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
2620
2620
2621
- Make sure we can parse:
2622
- 1
2623
- 2 3
2624
- 4 5 6
2625
- 7 8 9 10
2626
- """
2627
2621
sheet = self .get_exceldf (
2628
2622
'lowerdiagonal' , '.ods' , 'Sheet1' ,
2629
2623
index_col = None , header = None , engine = 'odf' )
@@ -2651,10 +2645,9 @@ def test_read_headers(self):
2651
2645
assert pd .isnull (value )
2652
2646
2653
2647
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)
2655
2650
2656
- Test reading a table out of a text document
2657
- """
2658
2651
table = self .get_exceldf (
2659
2652
'writertable' , '.odt' , 'Table1' , index_col = 0 , engine = 'odf' )
2660
2653
@@ -2682,8 +2675,6 @@ def test_blank_row_repeat(self):
2682
2675
assert not pd .isnull (table ['value' ][11 ])
2683
2676
2684
2677
def test_runlengthencoding (self ):
2685
- """Calc will use repeat when adjacent columns have the same value.
2686
- """
2687
2678
sheet = self .get_exceldf (
2688
2679
'runlengthencoding' , '.ods' , 'Sheet1' , header = None , engine = 'odf' )
2689
2680
assert sheet .shape == (5 , 3 )
0 commit comments