Standard tests for LangChain implementations
Actively maintained. Last release 7 days ago, commits in 26 of the last 26 weeks. A safe choice.
pip install langchain-tests🦜️🔗 langchain-tests
Looking for the JS/TS version? Check out LangChain.js.
Quick Install
uv add langchain-tests
🤔 What is this?
This is a testing library for LangChain integrations. It contains the base classes for a standard set of tests.
📖 Documentation
For full documentation, see the API reference.
📕 Releases & Versioning
See our Releases and Versioning policies.
We encourage pinning your version to a specific version in order to avoid breaking your CI when we publish new tests. We recommend upgrading to the latest version periodically to make sure you have the latest tests.
Not pinning your version will ensure you always have the latest tests, but it may also break your CI if we introduce tests that your integration doesn't pass.
💁 Contributing
As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.
For detailed information on how to contribute, see the Contributing Guide.
Usage
To add standard tests to an integration package (e.g., for a chat model), you need to create
- A unit test class that inherits from
ChatModelUnitTests - An integration test class that inherits from