slow-tests
БесплатноБез исполняемых скриптовНе проверенRun the gated test classes that plain `pytest` skips (slow Docker/sandbox tests, live model-provider API tests, flaky tests, trio variants). Use when asked to…
от UKGovernmentBEIS★ 3 389 звёзд на GitHubОб этом скилле
Running the gated tests
Plain pytest (and make test) runs the fast suite only. Four classes of
test are gated behind flags defined in tests/conftest.py. A gated test
that is not enabled shows as skipped, and the run still exits green. Enable
the class, then read the skip summary at the end of the run (-ra is in
addopts) to confirm the tests you meant to run actually ran.
PR CI runs almost none of these. A scheduled job in meridianlabs-ai/actions
runs pytest --runslow --runapi against main every couple of hours, so a
gated test that a change breaks fails there, after merge.
| Class | Flag | How a test joins it | What it needs | Does PR CI run it? |
|---|---|---|---|---|
| slow | --runslow |
@pytest.mark.slow |
Usually Docker (@skip_if_no_docker), sometimes a provider key too |
Only tests/tools/ when tool or sandbox code changed, plus the areas in the detect-slow table in .github/workflows/build.yml |
| api | --runapi |
skip_if_no_<provider> decorators in tests/test_helpers/utils.py add the api marker |
The provider's key or opt-in variable; the decorator names it | No. CI has no provider keys |
| flaky | --runflaky |
@pytest.mark.flaky |
Whatever the underlying test needs (Docker or a key) | No |
| trio | --runtrio |
Every async test gets a [trio] variant automatically |
A separate pytest invocation; it runs only the trio variants | No |
Flags combine, except --runtrio, which must be its own run.
Which tests to run for which change
Run the gated tests that cover the code you changed, scoped to the test directories that exercise it. The whole gated suite is large and spends provider credit; leave that to the scheduled job.
| You changed | Run |
|---|---|
src/inspect_ai/model/_providers/** or a provider conversion module in src/inspect_ai/model/ |
pytest --runapi --runslow tests/model/providers/test_<provider>*.py with that provider's key set. Shared code (_providers/util/, openai_compatible.py, providers.py) is used by many providers; run tests/model tests/tools tests/agent with a key for each provider built on it |
litellm_proxy.py or _litellm_proxy_*.py in src/inspect_ai/model/_providers/ |
pytest --runslow tests/model/providers/test_litellm_proxy*.py, then again with --runtrio. The Docker tests run the proxy image and fake upstreams offline. Add --runapi for the live round trips; each live deployment skips unless its key is set (see "LiteLLM proxy" below) |
src/inspect_ai/tool/** or src/inspect_sandbox_tools/** |
pytest --runslow -m slow tests/tools/ -x with Docker running. If you changed a sandbox tools build input (a path in src/inspect_ai/tool/_sandbox_tools_utils/injectable_paths.txt), build the -dev binaries first. Run python src/inspect_ai/tool/_sandbox_tools_utils/build_within_container.py --arch <arch>, then again with --musl. Use the architecture of your Docker host; CI uses amd64. The tests reuse the existing -dev binaries. Rebuild both after each change (see src/inspect_sandbox_tools/AGENTS.md) |
src/inspect_ai/util/_sandbox/** or src/inspect_ai/util/_checkpoint/** |
pytest --runslow tests/util/ tests/checkpoint/ with Docker running |
src/inspect_ai/agent/** |
pytest --runslow --runapi tests/agent/. Many of these are ACP and TUI tests that need only time; the rest need Docker or an OpenAI or Anthropic key |
Async plumbing (task groups, cancellation, anything under _util/_async.py or a bridge) |
The affected tests once normally and once with --runtrio |
A test marked flaky, or the code it covers |
That test with --runflaky |
Provider keys
Most providers gate on <PROVIDER>_API_KEY (OPENAI_API_KEY,
ANTHROPIC_API_KEY, GOOGLE_API_KEY, GROQ_API_KEY, and so on). Bedrock
and Vertex authenticate through AWS and gcloud credentials, so their gate is
an opt-in switch: ENABLE_BEDROCK_TESTS, ENABLE_VERTEX_TESTS. Azure-hosted
OpenAI and Mistral skip on their AZUREAI_* variables without the api
marker. When unsure, read the decorator on the test.
A provider file's tests often gate on several keys. With only
OPENAI_API_KEY set, test_openai*.py still reports skips for Together,
Bedrock, vLLM, and reasoning-summary access. Those are expected. A skip
whose reason names the key you set means that test did not run.
LiteLLM proxy
The litellm-proxy tests never pull images. They skip unless
ghcr.io/berriai/litellm:main-latest (override with LITELLM_PROXY_IMAGE)
is present locally, and the key and team alias tests also need
postgres:16 (LITELLM_PROXY_POSTGRES_IMAGE). Pull them once with
docker pull. The live tests pass the provider keys to the proxy container:
OPENAI_API_KEY, ANTHROPIC_API_KEY, GOOGLE_API_KEY, GROK_API_KEY,
META_API_KEY, MOONSHOT_API_KEY, TOGETHER_API_KEY, and
ENABLE_BEDROCK_TESTS with AWS credentials.
Docker
@skip_if_no_docker checks that the docker binary exists, not that the
daemon is up. With Docker
Установить slow-tests в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл slow-tests?
Run the gated test classes that plain `pytest` skips (slow Docker/sandbox tests, live model-provider API tests, flaky tests, trio variants). Use when asked to run slow, live, api, or trio tests, when debugging one, or when a change touches model providers, sandbox or tool code, agents, or async plumbing and needs its gated coverage run.
Как установить скилл slow-tests?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл slow-tests запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic