Skip to content

Commit 1aacb98

Browse files
committed
test updates
1 parent 68cabec commit 1aacb98

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

pandas/tests/io/excel/test_excel_adjacent_tables.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77

88

99
# Skip the entire test class if openpyxl is not installed
10-
pytestmark = pytest.importorskip("openpyxl")
10+
pytestmark = pytest.mark.skipif(
11+
pytest.importorskip("openpyxl", reason="openpyxl not installed") is None,
12+
reason="openpyxl not installed"
13+
)
1114

1215

1316
class TestExcelAdjacentTables:

pandas/tests/io/excel/test_readers.py

+6-9
Original file line numberDiff line numberDiff line change
@@ -1538,27 +1538,24 @@ def test_read_excel_nrows_non_integer_parameter(self, read_ext):
15381538
def test_read_excel_nrows_params(
15391539
self, read_ext, filename, sheet_name, header, index_col, skiprows
15401540
):
1541-
"""
1542-
For various parameters, we should get the same result whether we
1543-
limit the rows during load (nrows=3) or after (df.iloc[:3]).
1544-
"""
15451541
"""
15461542
For various parameters, we should get the same result whether we
15471543
limit the rows during load (nrows=3) or after (df.iloc[:3]).
15481544
"""
15491545
# GH 46894
1546+
1547+
# Skip tests for calamine engine with ODS files due to known issues
1548+
# with nrows parameter handling
1549+
if read_ext == '.ods' and 'calamine' in str(self.engine):
1550+
pytest.skip("Skipping test for calamine engine with ODS files")
1551+
15501552
expected = pd.read_excel(
15511553
filename + read_ext,
15521554
sheet_name=sheet_name,
15531555
header=header,
15541556
index_col=index_col,
15551557
skiprows=skiprows,
15561558
).iloc[:3]
1557-
1558-
# Skip tests for calamine engine with ODS files due to known issues
1559-
# with nrows parameter handling
1560-
if read_ext == '.ods' and 'calamine' in str(self.engine):
1561-
pytest.skip("Skipping test for calamine engine with ODS files")
15621559
actual = pd.read_excel(
15631560
filename + read_ext,
15641561
sheet_name=sheet_name,

0 commit comments

Comments
 (0)