File tree 1 file changed +9
-5
lines changed
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ def skip_ods_and_xlsb_files(read_ext):
19
19
pytest .skip ("Not valid for xlrd" )
20
20
21
21
22
+ @pytest .mark .filterwarnings (
23
+ "ignore:The Excel reader engine will default to:FutureWarning"
24
+ )
22
25
def test_read_xlrd_book (read_ext , frame ):
23
26
df = frame
24
27
@@ -38,13 +41,14 @@ def test_read_xlrd_book(read_ext, frame):
38
41
39
42
40
43
# TODO: test for openpyxl as well
44
+ @pytest .mark .filterwarnings (
45
+ "ignore:The Excel reader engine will default to:FutureWarning"
46
+ )
41
47
def test_excel_table_sheet_by_index (datapath , read_ext ):
42
48
path = datapath ("io" , "data" , "excel" , f"test1{ read_ext } " )
43
- with warnings .catch_warnings ():
44
- warnings .simplefilter ("ignore" )
45
- with pd .ExcelFile (path ) as excel :
46
- with pytest .raises (xlrd .XLRDError ):
47
- pd .read_excel (excel , sheet_name = "asdf" )
49
+ with pd .ExcelFile (path ) as excel :
50
+ with pytest .raises (xlrd .XLRDError ):
51
+ pd .read_excel (excel , sheet_name = "asdf" )
48
52
49
53
50
54
# See issue #29375
You can’t perform that action at this time.
0 commit comments