python3Packages.langsmith: Audit tests and checkInputs, limit to tests/unit_tests

This commit is contained in:
Sarah Clark
2026-01-03 12:38:56 -08:00
parent ee64bc91d4
commit bc0c269673
@@ -18,16 +18,14 @@
# tests
anthropic,
attrs,
dataclasses-json,
fastapi,
freezegun,
instructor,
multipart,
opentelemetry-sdk,
pytest-asyncio,
pytest-socket,
pytest-vcr,
pytestCheckHook,
uvicorn,
attr,
}:
buildPythonPackage rec {
@@ -60,46 +58,41 @@ buildPythonPackage rec {
nativeCheckInputs = [
anthropic
attrs
dataclasses-json
fastapi
freezegun
instructor
opentelemetry-sdk
pytest-asyncio
multipart
pytest-socket
pytest-vcr
pytestCheckHook
uvicorn
]
++ lib.optionals stdenv.hostPlatform.isLinux [ attr ];
];
# evaluation and external tests require OpenAPI key
# integration tests are all marked flaky
enabledTestPaths = [
"tests/unit_tests"
];
disabledTestMarks = [
"flaky"
];
disabledTests = [
# These tests require network access
"integration_tests"
# due to circular import
"test_as_runnable"
"test_as_runnable_batch"
"test_as_runnable_async"
"test_as_runnable_async_batch"
# Test requires git repo
"test_git_info"
# Tests require OpenAI API key
"test_chat_async_api"
"test_chat_sync_api"
"test_completions_async_api"
"test_completions_sync_api"
];
disabledTestPaths = [
# Circular import
"tests/integration_tests/"
# due to circular import
"tests/unit_tests/test_client.py"
"tests/unit_tests/evaluation/test_runner.py"
"tests/unit_tests/evaluation/test_runner.py"
# Require a Langsmith API key
"tests/evaluation/test_evaluation.py"
"tests/external/test_instructor_evals.py"
# Marked as flaky in source
"tests/unit_tests/test_run_helpers.py"
# flaky time comparisons
# https://github.com/langchain-ai/langsmith-sdk/issues/2245
"tests/unit_tests/test_uuid_v7.py"
];
pythonImportsCheck = [ "langsmith" ];