Files
voice-to-notes/python/tests/test_hardware.py

21 lines
676 B
Python
Raw Permalink Normal View History

"""Tests for hardware detection."""
from voice_to_notes.hardware.detect import HardwareInfo, detect_hardware
def test_hardware_info_defaults():
"""Test HardwareInfo default values."""
info = HardwareInfo()
assert info.has_cuda is False
assert info.recommended_model == "base"
assert info.recommended_device == "cpu"
def test_detect_hardware_returns_info():
"""Test that detect_hardware returns a valid HardwareInfo."""
info = detect_hardware()
assert isinstance(info, HardwareInfo)
assert info.cpu_cores > 0
# Should default to CPU since we're likely in a test env without GPU
assert info.recommended_device in ("cpu", "cuda")