Files
supervision/tests/conftest.py
T
0a95bae8a8 chore: bump minimum Python to 3.10 (#2260)
- Drop Python 3.9 from CI test matrix
- requires-python = ">=3.10" in pyproject.toml
- ruff target-version py39 → py310
- mypy python_version 3.9 → 3.10
- Remove Python 3.9 classifier

---------

Co-authored-by: Claude Code <noreply@anthropic.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-06-29 14:45:30 +02:00

70 lines
1.5 KiB
Python

import matplotlib
import numpy as np
import pytest
matplotlib.use("Agg")
import supervision as sv
from tests.helpers import _create_key_points
@pytest.fixture
def scene() -> np.ndarray:
return np.zeros((100, 100, 3), dtype=np.uint8)
@pytest.fixture
def sample_key_points() -> sv.KeyPoints:
return _create_key_points(
xy=[
[
[10, 10],
[20, 20],
[30, 30],
[40, 40],
[50, 50],
[60, 60],
[70, 70],
[80, 80],
[90, 90],
[10, 20],
[20, 30],
[30, 40],
[40, 50],
[50, 60],
[60, 70],
[70, 80],
[80, 90],
],
[
[10, 40],
[20, 50],
[30, 60],
[40, 70],
[50, 80],
[60, 90],
[70, 10],
[80, 20],
[90, 30],
[10, 50],
[20, 60],
[30, 70],
[40, 80],
[50, 90],
[60, 10],
[70, 20],
[80, 30],
],
],
confidence=[
[0.8] * 17,
[0.6] * 17,
],
class_id=[0, 1],
)
@pytest.fixture
def empty_key_points() -> sv.KeyPoints:
return sv.KeyPoints.empty()