mirror of
https://github.com/hwchase17/langchain.git
synced 2026-03-18 11:07:36 +00:00
18 lines
485 B
Python
18 lines
485 B
Python
"""Standard unit tests for ExaSearchRetriever."""
|
|
|
|
import pytest
|
|
from pytest_benchmark.fixture import BenchmarkFixture # type: ignore[import-untyped]
|
|
|
|
from langchain_exa import ExaSearchRetriever
|
|
|
|
|
|
@pytest.mark.benchmark
|
|
def test_exa_retriever_init_time(benchmark: BenchmarkFixture) -> None:
|
|
"""Test ExaSearchRetriever initialization time."""
|
|
|
|
def _init_exa_retriever() -> None:
|
|
for _ in range(10):
|
|
ExaSearchRetriever()
|
|
|
|
benchmark(_init_exa_retriever)
|