* test: cover public API gaps and dataset split * test(sinks): switch VideoSink to AVI/MJPG and add ImageSink clearing test * test(detection): add box_non_max_merge 6-column class-separation tests * test(dataset): drop deprecated dict API and strengthen class-id assertion * test(public_api): strengthen importability check with getattr --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
19 lines
579 B
Python
19 lines
579 B
Python
"""Guard that every symbol in supervision.__all__ is importable from the package."""
|
|
|
|
import pytest
|
|
|
|
import supervision as sv
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
"symbol_name",
|
|
[pytest.param(name, id=name) for name in sv.__all__],
|
|
)
|
|
def test_all_symbols_are_importable(symbol_name: str) -> None:
|
|
"""Every name in supervision.__all__ must be a non-None accessible attribute."""
|
|
val = getattr(sv, symbol_name, None)
|
|
assert val is not None, (
|
|
f"supervision.{symbol_name} is listed in __all__ but not accessible "
|
|
f"as a non-None package attribute"
|
|
)
|