Skip to content

Commit

Permalink
Added integration tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
3coins committed Mar 28, 2024
1 parent f1cccf8 commit 8f58ed3
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libs/aws/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ addopts = "--snapshot-warn-unused --strict-markers --strict-config --durations=5
# Registering custom markers.
# https://docs.pytest.org/en/7.1.x/example/markers.html#registering-markers
markers = [
"requires: mark tests as requiring a specific library",
"asyncio: mark tests as requiring asyncio",
"compile: mark placeholder test used to compile integration tests without running them",
"scheduled: mark tests to run in scheduled testing",
]
asyncio_mode = "auto"
Empty file.
Empty file.
Empty file.
21 changes: 21 additions & 0 deletions libs/aws/tests/integration_tests/llms/test_sagemaker_endpoint.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from typing import Dict

from langchain_aws.llms import SagemakerEndpoint
from langchain_aws.llms.sagemaker_endpoint import LLMContentHandler


class ContentHandler(LLMContentHandler):
def transform_input(self, prompt: str, model_kwargs: Dict) -> bytes:
return b""

def transform_output(self, output: bytes) -> str:
return ""


def test_sagemaker_endpoint_name_param() -> None:
llm = SagemakerEndpoint(
endpoint_name="foo",
content_handler=ContentHandler(),
region_name="us-west-2",
)
assert llm.endpoint_name == "foo"
7 changes: 7 additions & 0 deletions libs/aws/tests/integration_tests/test_compile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import pytest


@pytest.mark.compile
def test_placeholder() -> None:
"""Used for compiling integration tests without running any real tests."""
pass

0 comments on commit 8f58ed3

Please sign in to comment.