You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/tests/integration_tests
sergerdn 6dc86ad48f
feat: add pytest-vcr for recording HTTP interactions in integration tests (#2445)
Using `pytest-vcr` in integration tests has several benefits. Firstly,
it removes the need to mock external services, as VCR records and
replays HTTP interactions on the fly. Secondly, it simplifies the
integration test setup by eliminating the need to set up and tear down
external services in some cases. Finally, it allows for more reliable
and deterministic integration tests by ensuring that HTTP interactions
are always replayed with the same response.
Overall, `pytest-vcr` is a valuable tool for simplifying integration
test setup and improving their reliability

This commit adds the `pytest-vcr` package as a dependency for
integration tests in the `pyproject.toml` file. It also introduces two
new fixtures in `tests/integration_tests/conftest.py` files for managing
cassette directories and VCR configurations.

In addition, the
`tests/integration_tests/vectorstores/test_elasticsearch.py` file has
been updated to use the `@pytest.mark.vcr` decorator for recording and
replaying HTTP interactions.

Finally, this commit removes the `documents` fixture from the
`test_elasticsearch.py` file and replaces it with a new fixture defined
in `tests/integration_tests/vectorstores/conftest.py` that yields a list
of documents to use in any other tests.

This also includes my second attempt to fix issue :
https://github.com/hwchase17/langchain/issues/2386

Maybe related https://github.com/hwchase17/langchain/issues/2484
1 year ago
..
chains Add support for intermediate steps to SQLDatabaseSequentialChain (#1583) (#1601) 2 years ago
chat_models (ChatOpenAI) Add model_name to LLMResult.llm_output (#1960) 1 year ago
document_loaders Harrison/msg files (#2375) 1 year ago
embeddings Harrison/llama (#2314) 1 year ago
examples Harrison/msg files (#2375) 1 year ago
llms Add support for rwkv (#2422) 1 year ago
memory Harrison/memory base (#2122) 1 year ago
vectorstores feat: add pytest-vcr for recording HTTP interactions in integration tests (#2445) 1 year ago
__init__.py initial commit 2 years ago
conftest.py feat: add pytest-vcr for recording HTTP interactions in integration tests (#2445) 1 year ago
test_googlesearch_api.py Fix a bug that shows "KeyError 'items'" (#1118) 2 years ago
test_googleserper_api.py Google Search API integration with serper.dev (wrapper, tests, docs, … (#909) 2 years ago
test_ngram_overlap_example_selector.py Harrison/ngram example (#846) 2 years ago
test_nlp_text_splitters.py OptimizedPrompt -- k-shot example choice backed by semantic search (#91) 2 years ago
test_openweathermap.py Add OpenWeatherMap API Tool (#2083) 1 year ago
test_pdf_pagesplitter.py cleanup: unify 3 different pdf loaders, rename PagedPDFSplitter (#1615) 2 years ago
test_serpapi.py move serpapi wrapper (#1199) 2 years ago
test_text_splitter.py Add alternative token-based text splitter (#816) 2 years ago
test_wikipedia_api.py Modify output for wikipedia api wrapper (#2287) 1 year ago
test_wolfram_alpha_api.py Harrison/wolfram alpha (#579) 2 years ago