Skip to content

Commit

Permalink
docs: Update pytest table output (#656)
Browse files Browse the repository at this point in the history
Reflect langchain-ai/langsmith-sdk#1472

Merge after release
  • Loading branch information
jacoblee93 authored Feb 1, 2025
1 parent 9ede9b5 commit f08a087
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions docs/evaluation/how_to_guides/pytest.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion docs/evaluation/tutorials/testing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ module.exports = {
value: "python",
label: "Pytest",
language: "bash",
content: `pytest --output=ls tests`,
content: `pytest --langsmith-output tests`,
},
{
value: "vitest",
Expand Down

0 comments on commit f08a087

Please sign in to comment.