Files
WeHub Mirror b18e8dce68
Pytest/Test Workflow / Build this Package (push) Failing after 0s
Docs/Test Workflow / Test docs build (push) Has been cancelled
Check links & references / links-check (push) Has been cancelled
Pytest/Test Workflow / Pytest Run (none, macos-latest, 3.10) (push) Has been cancelled
Pytest/Test Workflow / Pytest Run (none, macos-latest, 3.11) (push) Has been cancelled
Pytest/Test Workflow / Pytest Run (none, macos-latest, 3.12) (push) Has been cancelled
Pytest/Test Workflow / Pytest Run (none, macos-latest, 3.13) (push) Has been cancelled
Pytest/Test Workflow / Pytest Run (none, ubuntu-latest, 3.10) (push) Has been cancelled
Pytest/Test Workflow / Pytest Run (none, ubuntu-latest, 3.11) (push) Has been cancelled
Pytest/Test Workflow / Pytest Run (none, ubuntu-latest, 3.12) (push) Has been cancelled
Pytest/Test Workflow / Pytest Run (none, ubuntu-latest, 3.13) (push) Has been cancelled
Pytest/Test Workflow / Pytest Run (none, windows-latest, 3.10) (push) Has been cancelled
Pytest/Test Workflow / Pytest Run (none, windows-latest, 3.11) (push) Has been cancelled
Pytest/Test Workflow / Pytest Run (none, windows-latest, 3.12) (push) Has been cancelled
Pytest/Test Workflow / Pytest Run (none, windows-latest, 3.13) (push) Has been cancelled
Pytest/Test Workflow / Pytest Run (opencv-python, macos-latest, 3.13) (push) Has been cancelled
Pytest/Test Workflow / Pytest Run (opencv-python, ubuntu-latest, 3.13) (push) Has been cancelled
Pytest/Test Workflow / Pytest Run (opencv-python, windows-latest, 3.13) (push) Has been cancelled
Pytest/Test Workflow / Pytest Run (opencv-python-headless, macos-latest, 3.13) (push) Has been cancelled
Pytest/Test Workflow / Pytest Run (opencv-python-headless, ubuntu-latest, 3.13) (push) Has been cancelled
Pytest/Test Workflow / Pytest Run (opencv-python-headless, windows-latest, 3.13) (push) Has been cancelled
Pytest/Test Workflow / Clean Wheel on macos-latest / Python 3.10 (push) Has been cancelled
Pytest/Test Workflow / Clean Wheel on macos-latest / Python 3.13 (push) Has been cancelled
Pytest/Test Workflow / Clean Wheel on ubuntu-latest / Python 3.10 (push) Has been cancelled
Pytest/Test Workflow / Clean Wheel on ubuntu-latest / Python 3.13 (push) Has been cancelled
Pytest/Test Workflow / Clean Wheel on windows-latest / Python 3.10 (push) Has been cancelled
Pytest/Test Workflow / Clean Wheel on windows-latest / Python 3.13 (push) Has been cancelled
PR Conflict Labeler / main (push) Has been cancelled
Docs/Build and Publish / Publish Docs (push) Has been cancelled
Pytest/Test Workflow / testing-guardian (push) Has been cancelled
WeHub snapshot of fb22686a5eb245d7e2594020003919ec2ff5510f
2026-08-07 16:05:38 +08:00

80 lines
1.7 KiB
Python

import sys
import warnings
from pathlib import Path
import numpy as np
import pytest
with warnings.catch_warnings():
warnings.simplefilter("ignore")
import matplotlib
REPO_ROOT = Path(__file__).resolve().parent.parent
sys.path.insert(0, str(REPO_ROOT / "src"))
matplotlib.use("Agg")
import supervision as sv # noqa: E402
from tests.helpers import _create_key_points # noqa: E402
@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()