Skip to content

Commit

Permalink
FIX-modin-project#2465: Add decorator to ensure read_excel does not l…
Browse files Browse the repository at this point in the history
…eak files

Signed-off-by: Vasilij Litvinov <vasilij.n.litvinov@intel.com>
  • Loading branch information
vnlitvinov committed Dec 5, 2020
1 parent c2e7f9e commit 09fc532
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modin/pandas/test/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import shutil
import sqlalchemy as sa
import csv
from pandas.util._test_decorators import check_file_leaks

from .utils import (
df_equals,
Expand Down Expand Up @@ -1184,6 +1185,7 @@ def test_from_clipboard():


@pytest.mark.xfail(reason="read_excel is broken for now, see #1733 for details")
@check_file_leaks
def test_from_excel():
setup_excel_file(NROWS)

Expand All @@ -1195,6 +1197,7 @@ def test_from_excel():
teardown_excel_file()


@check_file_leaks
def test_from_excel_engine():
setup_excel_file(NROWS)

Expand All @@ -1207,6 +1210,7 @@ def test_from_excel_engine():
teardown_excel_file()


@check_file_leaks
def test_from_excel_index_col():
setup_excel_file(NROWS)

Expand All @@ -1219,6 +1223,7 @@ def test_from_excel_index_col():
teardown_excel_file()


@check_file_leaks
def test_from_excel_all_sheets():
setup_excel_file(NROWS)

Expand All @@ -1236,6 +1241,7 @@ def test_from_excel_all_sheets():
teardown_excel_file()


@check_file_leaks
def test_from_excel_sheetname_title():
path = "modin/pandas/test/data/excel_sheetname_title.xlsx"
modin_df = pd.read_excel(path)
Expand All @@ -1247,6 +1253,7 @@ def test_from_excel_sheetname_title():
"sheet_name",
["Sheet1", "AnotherSpecialName", "SpecialName", "SecondSpecialName", 0, 1, 2, 3],
)
@check_file_leaks
def test_from_excel_sheet_name(sheet_name):
fname = "modin/pandas/test/data/modin_error_book.xlsx"
modin_df = pd.read_excel(fname, sheet_name=sheet_name)
Expand Down

0 comments on commit 09fc532

Please sign in to comment.