Skip to content

Commit 71dfed7

Browse files
authored
ENH: GH-35611 Tests for top-level Pandas functions serializable (#35692)
1 parent a1ac051 commit 71dfed7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pandas/tests/test_common.py

+10
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
import pandas as pd
1212
from pandas import Series, Timestamp
13+
import pandas._testing as tm
1314
from pandas.core import ops
1415
import pandas.core.common as com
1516

@@ -157,3 +158,12 @@ def test_version_tag():
157158
raise ValueError(
158159
"No git tags exist, please sync tags between upstream and your repo"
159160
)
161+
162+
163+
@pytest.mark.parametrize(
164+
"obj", [(obj,) for obj in pd.__dict__.values() if callable(obj)]
165+
)
166+
def test_serializable(obj):
167+
# GH 35611
168+
unpickled = tm.round_trip_pickle(obj)
169+
assert type(obj) == type(unpickled)

0 commit comments

Comments
 (0)