Files
supervision/tests/utils/test_notebook.py
T
Jirka BorovecandCodex c3413a8f10 fix(annotators): resolve annotator medium findings (#2407)
- Added deterministic color lookup with flexible palette resolution and clear errors for empty palettes
- Improved annotator and utility handling for warning formatting, plotting imports, and icon caching
- Added validation for keypoint edges, MediaPipe inputs, and VideoSink state

---------

Co-authored-by: Codex <codex@openai.com>
2026-07-06 22:43:35 +02:00

15 lines
440 B
Python

"""Tests for notebook display helpers."""
import importlib
import sys
def test_notebook_import_does_not_import_matplotlib_pyplot() -> None:
"""Importing notebook helpers keeps pyplot lazy until plotting is requested."""
sys.modules.pop("supervision.utils.notebook", None)
sys.modules.pop("matplotlib.pyplot", None)
importlib.import_module("supervision.utils.notebook")
assert "matplotlib.pyplot" not in sys.modules