File tree 1 file changed +6
-2
lines changed 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -390,10 +390,14 @@ def test_depr_pandas_core_submodule(submodule_name):
390
390
submodule = getattr (pd ._core , submodule_name )
391
391
warning_msg = "pandas.core is deprecated"
392
392
for submodule_member_name in dir (submodule ):
393
+ if submodule_member_name .startswith ("__" ) and submodule_member_name .endswith (
394
+ "__"
395
+ ):
396
+ continue
393
397
submodule_member = getattr (submodule , submodule_member_name )
394
-
395
398
with tm .assert_produces_warning (DeprecationWarning , match = warning_msg ):
396
399
core_submodule = __import__ (
397
400
f"pandas.core.{ submodule_name } " , fromlist = [submodule_member_name ]
398
401
)
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 )
You can’t perform that action at this time.
0 commit comments