Skip to content

TST: Test for private modules exposed via API #25935

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 1, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions pandas/tests/api/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)))

Expand Down Expand Up @@ -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,
Expand All @@ -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)


Expand Down