test(langchain,partners): disable pytest-benchmark under xdist to silence PytestBenchmarkWarning - #37901
Merged
Merged
Conversation
…ence `PytestBenchmarkWarning` Test targets run with `-n auto`, which makes `pytest-benchmark` (present via `langchain-tests`) auto-disable itself and emit a `PytestBenchmarkWarning` once per xdist worker. Passing `--benchmark-disable` turns the plugin off explicitly so the warning never fires, matching what `core` and `langchain_v1` already do. ## Changes - Add `--benchmark-disable` to the `-n auto` test targets across `langchain` (unit) and 14 partner packages' integration targets: `anthropic`, `chroma`, `deepseek`, `exa`, `fireworks`, `groq`, `huggingface`, `mistralai`, `nomic`, `ollama`, `openai`, `openrouter`, `qdrant`, `xai`. - Deliberately excluded `text-splitters` and `model-profiles`: their `test` group doesn't install `pytest-benchmark`, so the flag would fail with `unrecognized arguments`. Verified by importing the plugin under each package's actual dependency group before editing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test targets run with
-n auto, which makespytest-benchmark(present vialangchain-tests) auto-disable itself and emit aPytestBenchmarkWarningonce per xdist worker. Passing--benchmark-disableturns the plugin off explicitly so the warning never fires, matching whatcoreandlangchain_v1already do.Changes
--benchmark-disableto the-n autotest targets acrosslangchain(unit) and 14 partner packages' integration targets:anthropic,chroma,deepseek,exa,fireworks,groq,huggingface,mistralai,nomic,ollama,openai,openrouter,qdrant,xai.text-splittersandmodel-profiles: theirtestgroup doesn't installpytest-benchmark, so the flag would fail withunrecognized arguments. Verified by importing the plugin under each package's actual dependency group before editing.