Files
supervision/tests/cv2/test_common.py
T
3d669f1ab4 feat(cv2): add image fallback backend (#2431)
- Organize facade constants and implementations into thematic private modules.
- Add NumPy/Pillow/SciPy fallbacks with OpenCV parity coverage.
- Mirror package modules in cv2 tests and verify blocked imports.
- Split compound operation tests into isolated cases.
- Parameterize color parity and fallback bindings for targeted failures.
- Inline color conversion cases at their only use site.
- Inline fallback binding cases while preserving reusable manifests.

---------

Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-15 21:55:08 +02:00

14 lines
437 B
Python

"""Tests for shared private OpenCV fallback helpers."""
from __future__ import annotations
import pytest
from supervision._cv2._common import BackendUnavailableError, _unavailable
def test_unavailable_operation_raises_actionable_error() -> None:
"""Explain which backend is missing when an operation is not implemented."""
with pytest.raises(BackendUnavailableError, match="OpenCV is not installed"):
_unavailable()