mirror of https://github.com/hwchase17/langchain
standard-tests[patch]: Add pytest assert rewrites (#24408)
This will surface nice error messages in subclasses that fail assertions.pull/24420/head
parent
f62b323108
commit
ef22ebe431
@ -1,3 +1,16 @@
|
||||
# ruff: noqa: E402
|
||||
import pytest
|
||||
|
||||
# Rewrite assert statements for test suite so that implementations can
|
||||
# see the full error message from failed asserts.
|
||||
# https://docs.pytest.org/en/7.1.x/how-to/writing_plugins.html#assertion-rewriting
|
||||
modules = [
|
||||
"chat_models",
|
||||
]
|
||||
|
||||
for module in modules:
|
||||
pytest.register_assert_rewrite(f"langchain_standard_tests.unit_tests.{module}")
|
||||
|
||||
from langchain_standard_tests.unit_tests.chat_models import ChatModelUnitTests
|
||||
|
||||
__all__ = ["ChatModelUnitTests"]
|
||||
|
Loading…
Reference in New Issue