|
1 | | -from distutils.version import LooseVersion |
2 | 1 | from pathlib import Path |
3 | 2 |
|
4 | 3 | import numpy as np |
5 | 4 | import pytest |
6 | 5 |
|
7 | | -from pandas.compat._optional import get_version |
8 | | - |
9 | 6 | import pandas as pd |
10 | 7 | from pandas import DataFrame |
11 | 8 | import pandas._testing as tm |
@@ -157,10 +154,6 @@ def test_read_with_bad_dimension( |
157 | 154 | datapath, ext, header, expected_data, filename, read_only, request |
158 | 155 | ): |
159 | 156 | # GH 38956, 39001 - no/incorrect dimension information |
160 | | - version = LooseVersion(get_version(openpyxl)) |
161 | | - if (read_only or read_only is None) and version < "3.0.0": |
162 | | - msg = "openpyxl read-only sheet is incorrect when dimension data is wrong" |
163 | | - request.node.add_marker(pytest.mark.xfail(reason=msg)) |
164 | 157 | path = datapath("io", "data", "excel", f"{filename}{ext}") |
165 | 158 | if read_only is None: |
166 | 159 | result = pd.read_excel(path, header=header) |
@@ -195,10 +188,6 @@ def test_append_mode_file(ext): |
195 | 188 | @pytest.mark.parametrize("read_only", [True, False, None]) |
196 | 189 | def test_read_with_empty_trailing_rows(datapath, ext, read_only, request): |
197 | 190 | # GH 39181 |
198 | | - version = LooseVersion(get_version(openpyxl)) |
199 | | - if (read_only or read_only is None) and version < "3.0.0": |
200 | | - msg = "openpyxl read-only sheet is incorrect when dimension data is wrong" |
201 | | - request.node.add_marker(pytest.mark.xfail(reason=msg)) |
202 | 191 | path = datapath("io", "data", "excel", f"empty_trailing_rows{ext}") |
203 | 192 | if read_only is None: |
204 | 193 | result = pd.read_excel(path) |
|
0 commit comments