test: Skip tests requiring optional dependencies
- Skip test_benchmark.py if psutil not installed - Skip test_embedding.py if numpy not installed - Skip test_embedding_pipeline.py if numpy not installed - Uses pytest.importorskip() for clean dependency handling - Fixes CI test collection errors for optional features
This commit is contained in:
@@ -7,6 +7,9 @@ import tempfile
|
||||
from pathlib import Path
|
||||
from unittest.mock import patch
|
||||
|
||||
# Skip all tests if numpy is not installed
|
||||
pytest.importorskip("numpy")
|
||||
|
||||
from skill_seekers.embedding.models import (
|
||||
EmbeddingRequest,
|
||||
BatchEmbeddingRequest,
|
||||
|
||||
Reference in New Issue
Block a user