Skip to content

test: cover embedding provider factory edge cases#231

Open
haosenwang1018 wants to merge 1 commit intozilliztech:mainfrom
haosenwang1018:test/embeddings-factory-coverage
Open

test: cover embedding provider factory edge cases#231
haosenwang1018 wants to merge 1 commit intozilliztech:mainfrom
haosenwang1018:test/embeddings-factory-coverage

Conversation

@haosenwang1018
Copy link
Copy Markdown
Contributor

What

  • add coverage for DEFAULT_MODELS
  • add factory tests for unknown providers and missing-extra install hints
  • add provider-instantiation tests for openai kwargs passthrough and non-openai kwargs filtering

Why

Follow-up coverage for #114.

The embeddings factory contains pure dispatch and dependency-error logic that can regress silently without unit tests. This patch locks down provider selection, optional kwargs handling, and the helpful install-hint error path.

Testing

  • uv run python -m pytest tests/test_embeddings_factory.py -q
  • uv run ruff check tests/test_embeddings_factory.py
  • uv run ruff format --check tests/test_embeddings_factory.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant