From f08a087a176c76d9f71e556b81d1f30ca69ea8bf Mon Sep 17 00:00:00 2001 From: Jacob Lee Date: Sat, 1 Feb 2025 10:08:44 -0800 Subject: [PATCH] docs: Update pytest table output (#656) Reflect https://github.com/langchain-ai/langsmith-sdk/pull/1472 Merge after release --- docs/evaluation/how_to_guides/pytest.mdx | 8 +++++--- docs/evaluation/tutorials/testing.mdx | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/evaluation/how_to_guides/pytest.mdx b/docs/evaluation/how_to_guides/pytest.mdx index 152cffcb..d7f776ad 100644 --- a/docs/evaluation/how_to_guides/pytest.mdx +++ b/docs/evaluation/how_to_guides/pytest.mdx @@ -25,7 +25,7 @@ The JS/TS SDK has an analogous [Vitest/Jest integration](./vitest_jest). ## Installation -This functionality requires Python SDK version `langsmith>=0.3.1`. +This functionality requires Python SDK version `langsmith>=0.3.4`. For extra features like [rich terminal outputs](./pytest#rich-outputs) and [test caching](./pytest#caching) install: ```bash @@ -296,12 +296,14 @@ LANGSMITH_TEST_CACHE=tests/cassettes ptw tests/my_llm_tests ## Rich outputs -If you'd like to see a rich display of the LangSmith results of your test run you can specify `--output='ls'`: +If you'd like to see a rich display of the LangSmith results of your test run you can specify `--langsmith-output`: ```bash -pytest --output='ls' tests +pytest --langsmith-output tests ``` +**Note:** This flag used to be `--output=langsmith` in `langsmith<=0.3.3` but was updated to avoid collisions with other pytest plugins. + You'll get a nice table per test suite that updates live as the results are uploaded to LangSmith: ![Rich pytest outputs](./static/rich-pytest-outputs.png) diff --git a/docs/evaluation/tutorials/testing.mdx b/docs/evaluation/tutorials/testing.mdx index 47ee7a35..d96f1831 100644 --- a/docs/evaluation/tutorials/testing.mdx +++ b/docs/evaluation/tutorials/testing.mdx @@ -836,7 +836,7 @@ module.exports = { value: "python", label: "Pytest", language: "bash", - content: `pytest --output=ls tests`, + content: `pytest --langsmith-output tests`, }, { value: "vitest",