Skip to content

TST: add tests for parser functions being pickle-able. #48389

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions pandas/tests/io/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import mmap
import os
from pathlib import Path
import pickle
import tempfile

import pytest
Expand Down Expand Up @@ -604,3 +605,23 @@ def close(self):
with BytesIO() as buffer:
with icom.get_handle(buffer, "rb") as handles:
handles.created_handles.append(TestError())


@pytest.mark.parametrize(
"reader",
[
pd.read_csv,
pd.read_fwf,
pd.read_excel,
pd.read_feather,
pd.read_hdf,
pd.read_stata,
pd.read_sas,
pd.read_json,
pd.read_pickle,
],
)
def test_pickle_reader(reader):
# GH 22265
with BytesIO() as buffer:
pickle.dump(reader, buffer)