Skip to content

Commit a9138a9

Browse files
TST: add tests for parser functions being pickle-able. (#48389)
1 parent 82ce975 commit a9138a9

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

pandas/tests/io/test_common.py

+21
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import mmap
1313
import os
1414
from pathlib import Path
15+
import pickle
1516
import tempfile
1617

1718
import pytest
@@ -604,3 +605,23 @@ def close(self):
604605
with BytesIO() as buffer:
605606
with icom.get_handle(buffer, "rb") as handles:
606607
handles.created_handles.append(TestError())
608+
609+
610+
@pytest.mark.parametrize(
611+
"reader",
612+
[
613+
pd.read_csv,
614+
pd.read_fwf,
615+
pd.read_excel,
616+
pd.read_feather,
617+
pd.read_hdf,
618+
pd.read_stata,
619+
pd.read_sas,
620+
pd.read_json,
621+
pd.read_pickle,
622+
],
623+
)
624+
def test_pickle_reader(reader):
625+
# GH 22265
626+
with BytesIO() as buffer:
627+
pickle.dump(reader, buffer)

0 commit comments

Comments
 (0)