File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,13 +89,49 @@ Most tests require you to [set up a mock server](https://github.com/stoplightio/
8989
9090``` sh
9191# you will need npm installed
92- $ npx prism mock path/to/your/openapi.yml
92+ npx prism mock path/to/your/openapi.yml
9393```
9494
9595``` sh
96- $ ./scripts/test
96+ # run all tests
97+ ./scripts/test
98+
99+ # pass in pytest args, eg to show info on skipped tests:
100+ ./scripts/test -rs
101+
102+ # Run tests for only one python version
103+ UV_PYTHON=3.13 ./scripts/test
104+ ```
105+
106+ ### Running pytets
107+
108+ Assuming you have a uv virtual env set up in .venv, the following are helpful for more granular test running:
109+
110+ ``` sh
111+ # Run all tests pytests
112+ .venv/bin/pytest tests/
113+
114+ # Run all SDK tests with verbose info
115+ .venv/bin/pytest tests/sdk/ -v
116+
117+ # Run specific test class
118+ .venv/bin/pytest tests/sdk/test_clients.py::TestAgentClient -v
119+
120+ # Run specific test method
121+ .venv/bin/pytest tests/sdk/test_clients.py::TestAgentClient::test_create_from_npm -v
122+
123+ # Run agent smoketests (requires RUNLOOP_API_KEY)
124+ export RUNLOOP_API_KEY=your_key_here
125+ .venv/bin/pytest tests/smoketests/sdk/test_agent.py -v
126+
127+ # Run tests matching a pattern
128+ .venv/bin/pytest tests/sdk/ -k " agent" -v
129+
130+ # Run with coverage
131+ .venv/bin/pytest tests/sdk/ --cov=src/runloop_api_client/sdk --cov-report=html
97132```
98133
134+
99135## Linting and formatting
100136
101137This repository uses [ ruff] ( https://github.com/astral-sh/ruff ) and
You can’t perform that action at this time.
0 commit comments