Files
OpenGait/tests/demo/conftest.py
T
crosstyan d6fd6c03e6 test(demo): add unit and integration coverage for pipeline
Introduce focused unit, integration, and NATS-path tests for demo modules, and align assertions with final schema and temporal contracts (window int, seq=30, fill-level ratio). This commit isolates validation logic from runtime changes and provides reproducible QA for pipeline behavior and failure modes.
2026-02-27 09:59:14 +08:00

24 lines
526 B
Python

"""Test fixtures for demo package."""
import numpy as np
import pytest
import torch
@pytest.fixture
def mock_frame_tensor():
"""Return a mock video frame tensor (C, H, W)."""
return torch.randn(3, 224, 224)
@pytest.fixture
def mock_frame_array():
"""Return a mock video frame as numpy array (H, W, C)."""
return np.random.randn(224, 224, 3).astype(np.float32)
@pytest.fixture
def mock_video_sequence():
"""Return a mock video sequence tensor (T, C, H, W)."""
return torch.randn(16, 3, 224, 224)