Skip to content

Commit feab7ee

Browse files
committed
mRevert and recover the issue again
1 parent 9977ca7 commit feab7ee

File tree

3 files changed

+8
-62
lines changed

3 files changed

+8
-62
lines changed

pandas/tests/io/test_common.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,7 @@ def test_read_non_existent(self, reader, module, error_class, fn_ext):
222222
(pd.DataFrame.to_html, "os", OSError, "html"),
223223
(pd.DataFrame.to_excel, "xlrd", OSError, "xlsx"),
224224
(pd.DataFrame.to_feather, "pyarrow", OSError, "feather"),
225-
(
226-
pd.DataFrame.to_parquet,
227-
"pyarrow",
228-
(OSError, FileNotFoundError),
229-
"parquet",
230-
),
225+
(pd.DataFrame.to_parquet, "pyarrow", OSError, "parquet"),
231226
(pd.DataFrame.to_stata, "os", OSError, "dta"),
232227
(pd.DataFrame.to_json, "os", OSError, "json"),
233228
(pd.DataFrame.to_pickle, "os", OSError, "pickle"),
@@ -241,13 +236,10 @@ def test_write_missing_parent_directory(self, method, module, error_class, fn_ex
241236

242237
path = os.path.join(HERE, "data", "missing_folder", "does_not_exist." + fn_ext)
243238

244-
msg = "|".join(
245-
[
246-
r"\[Errno 2\] No such",
247-
"Cannot save file into a non-existent directory: .*missing_folder",
248-
]
249-
)
250-
with pytest.raises(error_class, match=msg):
239+
with pytest.raises(
240+
error_class,
241+
match=r"Cannot save file into a non-existent directory: .*missing_folder",
242+
):
251243
method(dummy_frame, path)
252244

253245
@pytest.mark.parametrize(

pandas/tests/io/test_fsspec.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import numpy as np
44
import pytest
55

6-
from pandas.compat import is_platform_mac
76
from pandas.compat._optional import VERSIONS
87

98
from pandas import (
@@ -161,12 +160,6 @@ def test_to_parquet_new_file(monkeypatch, cleared_fs):
161160
)
162161

163162

164-
@pytest.mark.xfail(
165-
is_platform_mac(),
166-
raises=ImportError,
167-
reason="Raises Library not loaded: @rpath/libssl.1.1.dylib in CI",
168-
strict=False,
169-
)
170163
@td.skip_if_no("pyarrow", min_version="2")
171164
def test_arrowparquet_options(fsspectest):
172165
"""Regression test for writing to a not-yet-existent GCS Parquet file."""

pandas/tests/io/test_parquet.py

Lines changed: 3 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@
1313

1414
from pandas._config import get_option
1515

16-
from pandas.compat import (
17-
is_platform_mac,
18-
is_platform_windows,
19-
)
16+
from pandas.compat import is_platform_windows
2017
from pandas.compat.pyarrow import (
2118
pa_version_under2p0,
2219
pa_version_under5p0,
@@ -258,12 +255,6 @@ def test_invalid_engine(df_compat):
258255
check_round_trip(df_compat, "foo", "bar")
259256

260257

261-
@pytest.mark.xfail(
262-
is_platform_mac(),
263-
raises=ImportError,
264-
reason="Raises Library not loaded: @rpath/libssl.1.1.dylib in CI",
265-
strict=False,
266-
)
267258
def test_options_py(df_compat, pa):
268259
# use the set option
269260

@@ -285,12 +276,6 @@ def test_options_auto(df_compat, fp, pa):
285276
check_round_trip(df_compat)
286277

287278

288-
@pytest.mark.xfail(
289-
is_platform_mac(),
290-
raises=ImportError,
291-
reason="Raises Library not loaded: @rpath/libssl.1.1.dylib in CI",
292-
strict=False,
293-
)
294279
def test_options_get_engine(fp, pa):
295280
assert isinstance(get_engine("pyarrow"), PyArrowImpl)
296281
assert isinstance(get_engine("fastparquet"), FastParquetImpl)
@@ -354,12 +339,6 @@ def test_get_engine_auto_error_message():
354339
get_engine("auto")
355340

356341

357-
@pytest.mark.xfail(
358-
is_platform_mac(),
359-
raises=ImportError,
360-
reason="Raises Library not loaded: @rpath/libssl.1.1.dylib in CI",
361-
strict=False,
362-
)
363342
def test_cross_engine_pa_fp(df_cross_compat, pa, fp):
364343
# cross-compat with differing reading/writing engines
365344

@@ -374,13 +353,7 @@ def test_cross_engine_pa_fp(df_cross_compat, pa, fp):
374353
tm.assert_frame_equal(result, df[["a", "d"]])
375354

376355

377-
@pytest.mark.xfail(
378-
is_platform_mac(),
379-
raises=ImportError,
380-
reason="Raises Library not loaded: @rpath/libssl.1.1.dylib in CI",
381-
strict=False,
382-
)
383-
def test_cross_engine_fp_pa(df_cross_compat, pa, fp):
356+
def test_cross_engine_fp_pa(request, df_cross_compat, pa, fp):
384357
# cross-compat with differing reading/writing engines
385358
df = df_cross_compat
386359
with tm.ensure_clean() as path:
@@ -420,12 +393,6 @@ def test_parquet_read_from_url(self, df_compat, engine):
420393
tm.assert_frame_equal(df, df_compat)
421394

422395

423-
@pytest.mark.xfail(
424-
is_platform_mac(),
425-
raises=ImportError,
426-
reason="Raises Library not loaded: @rpath/libssl.1.1.dylib in CI",
427-
strict=False,
428-
)
429396
class TestBasic(Base):
430397
def test_error(self, engine):
431398
for obj in [
@@ -701,12 +668,6 @@ def test_read_empty_array(self, pa, dtype):
701668
check_round_trip(df, pa, read_kwargs={"use_nullable_dtypes": True})
702669

703670

704-
@pytest.mark.xfail(
705-
is_platform_mac(),
706-
raises=ImportError,
707-
reason="Raises Library not loaded: @rpath/libssl.1.1.dylib in CI",
708-
strict=False,
709-
)
710671
@pytest.mark.filterwarnings("ignore:CategoricalBlock is deprecated:DeprecationWarning")
711672
class TestParquetPyArrow(Base):
712673
def test_basic(self, pa, df_full):
@@ -874,7 +835,7 @@ def test_s3_roundtrip_for_dir(
874835
repeat=1,
875836
)
876837

877-
@td.skip_if_no("pyarrow", min_version="3")
838+
@td.skip_if_no("pyarrow")
878839
def test_read_file_like_obj_support(self, df_compat):
879840
buffer = BytesIO()
880841
df_compat.to_parquet(buffer)

0 commit comments

Comments
 (0)