File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -2567,18 +2567,24 @@ def test_get_sheet(self):
2567
2567
pth = os .path .join (self .dirpath , 'datatypes.ods' )
2568
2568
book = _ODFReader (pth )
2569
2569
2570
+ assert len (book .sheet_names ) == 1
2571
+ assert book .sheet_names == ['Sheet1' ]
2572
+
2573
+ def test_get_sheet_raises (self ):
2574
+ from pandas .io .excel ._odfreader import _ODFReader
2575
+
2576
+ pth = os .path .join (self .dirpath , 'datatypes.ods' )
2577
+ book = _ODFReader (pth )
2578
+
2570
2579
with pytest .raises (ValueError ):
2571
- book .get_sheet (3.14 )
2580
+ book ._get_sheet (3.14 )
2572
2581
2573
2582
with pytest .raises (ValueError ):
2574
2583
book .get_sheet_by_name ("Invalid Sheet 77" )
2575
2584
2576
2585
with pytest .raises (IndexError ):
2577
2586
book .get_sheet_by_index (- 33 )
2578
2587
2579
- assert len (book .sheet_names ) == 1
2580
- assert book .sheet_names == ['Sheet1' ]
2581
-
2582
2588
def test_read_types (self ):
2583
2589
"""Make sure we read ODF data types correctly
2584
2590
"""
You can’t perform that action at this time.
0 commit comments