diff --git a/pandas/tests/api/test_api.py b/pandas/tests/api/test_api.py index 8a0a27a71784c..d450f5b9ce101 100644 --- a/pandas/tests/api/test_api.py +++ b/pandas/tests/api/test_api.py @@ -11,7 +11,7 @@ def check(self, namespace, expected, ignored=None): # ignored ones # compare vs the expected - result = sorted(f for f in dir(namespace) if not f.startswith('_')) + result = sorted(f for f in dir(namespace) if not f.startswith('__')) if ignored is not None: result = sorted(list(set(result) - set(ignored))) @@ -93,6 +93,12 @@ class TestPDApi(Base): # these are already deprecated; awaiting removal deprecated_funcs = [] + # private modules in pandas namespace + private_modules = ['_config', '_hashtable', '_lib', '_libs', + '_np_version_under1p14', '_np_version_under1p15', + '_np_version_under1p16', '_np_version_under1p17', + '_tslib', '_typing', '_version'] + def test_api(self): self.check(pd, @@ -103,7 +109,7 @@ def test_api(self): self.funcs + self.funcs_option + self.funcs_read + self.funcs_to + self.deprecated_funcs_in_future + - self.deprecated_funcs, + self.deprecated_funcs + self.private_modules, self.ignored)