Skip to content

Commit fe05351

Browse files
timsaucerclaude
andcommitted
Skip private internal methods in wrapper coverage test
Single-underscore methods on internal pyo3 classes (such as SessionContext._install_extensions) are private support methods for the Python wrappers and do not require a public wrapper. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent a8820d2 commit fe05351

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

python/tests/test_wrapper_coverage.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ def missing_exports(internal_obj, wrapped_obj) -> None:
6767
pytest.fail(f"Missing __repr__: {internal_obj.__name__}")
6868

6969
for internal_attr_name in dir(internal_obj):
70+
# Single-underscore names are private support methods for the
71+
# wrappers (e.g. SessionContext._install_extensions) and are not
72+
# part of the public surface that requires a wrapper.
73+
if internal_attr_name.startswith("_") and not internal_attr_name.startswith(
74+
"__"
75+
):
76+
continue
77+
7078
wrapped_attr_name = internal_attr_name.removeprefix("Raw")
7179

7280
assert wrapped_attr_name in dir(wrapped_obj)

0 commit comments

Comments
 (0)