Skip to content

Commit a317676

Browse files
committed
Fix test
1 parent 1f33f4d commit a317676

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pandas/tests/api/test_api.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,10 +390,14 @@ def test_depr_pandas_core_submodule(submodule_name):
390390
submodule = getattr(pd._core, submodule_name)
391391
warning_msg = "pandas.core is deprecated"
392392
for submodule_member_name in dir(submodule):
393+
if submodule_member_name.startswith("__") and submodule_member_name.endswith(
394+
"__"
395+
):
396+
continue
393397
submodule_member = getattr(submodule, submodule_member_name)
394-
395398
with tm.assert_produces_warning(DeprecationWarning, match=warning_msg):
396399
core_submodule = __import__(
397400
f"pandas.core.{submodule_name}", fromlist=[submodule_member_name]
398401
)
399-
assert submodule_member is getattr(core_submodule, submodule_member_name)
402+
with tm.assert_produces_warning(DeprecationWarning, match=warning_msg):
403+
assert submodule_member is getattr(core_submodule, submodule_member_name)

0 commit comments

Comments
 (0)