Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.
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
14 changes: 12 additions & 2 deletions tests/test_0_API.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# SPDX-License-Identifier: Apache-2.0
import morphio


def test_doc_exists():
classes = [
morphio.EndoplasmicReticulum,
Expand All @@ -18,8 +17,19 @@ def test_doc_exists():
morphio.mut.Section,
morphio.mut.Soma,
]

# we want to makes sure we never forget to add imports in the morphio.__init__
# however, sometimes pybind adds new functions in that namespace, this is the
# place to explicitly ignore them
ignored_methods = {
"_pybind11_conduit_v1_"
}

for cls in classes:
public_methods = (method for method in dir(cls) if not method[:2] == '__')
public_methods = (
method for method in dir(cls)
if not (method.startswith("__") or method in ignored_methods)
)
for method in public_methods:
assert getattr(cls, method).__doc__, \
'Public method {} of class {} is not documented !'.format(method, cls)
Expand Down
Loading