Skip to content

Commit

Permalink
flags in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
isahers1 committed Dec 9, 2024
1 parent 1abe4f9 commit 39be3c7
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions python/tests/integration_tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,9 @@ def test_error_surfaced_invalid_uri(uri: str) -> None:

def test_upload_examples_multipart(langchain_client: Client):
"""Test uploading examples with attachments via multipart endpoint."""
langchain_client._info = {
"instance_flags": {"dataset_examples_multipart_enabled": True}
}
dataset_name = "__test_upload_examples_multipart" + uuid4().hex[:4]
if langchain_client.has_dataset(dataset_name=dataset_name):
langchain_client.delete_dataset(dataset_name=dataset_name)
Expand Down Expand Up @@ -1245,11 +1248,11 @@ def test_list_examples_attachments_keys(langchain_client: Client) -> None:
langchain_client.delete_dataset(dataset_id=dataset.id)


@pytest.mark.skip(
reason="Need to land https://github.com/langchain-ai/langsmith-sdk/pull/1209 first"
)
def test_evaluate_with_attachments(langchain_client: Client) -> None:
"""Test evaluating examples with attachments."""
langchain_client._info = {
"instance_flags": {"dataset_examples_multipart_enabled": True}
}
dataset_name = "__test_evaluate_attachments" + uuid4().hex[:4]
# 1. Create dataset
dataset = langchain_client.create_dataset(
Expand Down Expand Up @@ -1305,6 +1308,9 @@ def evaluator(run: Run, example: Example) -> Dict[str, Any]:

def test_evaluate_with_no_attachments(langchain_client: Client) -> None:
"""Test evaluating examples without attachments using a target with attachments."""
langchain_client._info = {
"instance_flags": {"dataset_examples_multipart_enabled": True}
}
dataset_name = "__test_evaluate_no_attachments" + uuid4().hex[:4]
dataset = langchain_client.create_dataset(
dataset_name,
Expand Down

0 comments on commit 39be3c7

Please sign in to comment.