Commit ae0f11b
Test suite v0.4 (#637)
* test: add `__init__` to make `tests/` a package
* test: add llm_event_spy fixture for tests
* test: add VCR.py fixture for HTTP interaction recording
* deps: group integration-testing
* test: add fixture to mock package availability in tests
* test: Add integration tests for OpenAI provider and features
* test: add tests for concurrent API requests handling
* Improve vcr.py configuration
Signed-off-by: Teo <teocns@gmail.com>
* ruff
Signed-off-by: Teo <teocns@gmail.com>
* chore(pyproject): update pytest options and loop scope
* chore(tests): update vcr.py ignore_hosts and options
* pyproject.toml
Signed-off-by: Teo <teocns@gmail.com>
* centralize teardown in conftest.py (clear singletons, end all sessions)
Signed-off-by: Teo <teocns@gmail.com>
* change vcr_config scope to session
Signed-off-by: Teo <teocns@gmail.com>
* integration: auto start agentops session
Signed-off-by: Teo <teocns@gmail.com>
* Move unit tests to dedicated folder (tests/unit)
Signed-off-by: Teo <teocns@gmail.com>
* Isolate vcr_config import into tests/integration
Signed-off-by: Teo <teocns@gmail.com>
* configure pytest to run only unit tests by default, and include integration tests only when explicitly specified.
Signed-off-by: Teo <teocns@gmail.com>
* ci(python-tests): separate job between unit-integration tests
* set python-tests timeout to 5 minutes
Signed-off-by: Teo <teocns@gmail.com>
* ruff
Signed-off-by: Teo <teocns@gmail.com>
* Implement jwt fixture, centralized reusable mock_req into conftest.py
Signed-off-by: Teo <teocns@gmail.com>
reauthorize
Signed-off-by: Teo <teocns@gmail.com>
* ci(python-tests): simplify env management, remove cov from integration-teests
Signed-off-by: Teo <teocns@gmail.com>
* ruff
Signed-off-by: Teo <teocns@gmail.com>
* fix: cassette for test_concurrent_api_requests
Signed-off-by: Teo <teocns@gmail.com>
* Cleanup vcr.py comments
Signed-off-by: Teo <teocns@gmail.com>
* add a `TODO` for removing `vcrpy` git version after its release
* refactor openai assistants response handling for easier testing
* add more keys for different llm providers
* add integration tests for other providers
* remove openai version limitation
* add providers as deps
* chore: add mistralai to test dependencies
* remove `mistral` from dependency since its incorrect
* ruff
* re-record cassettes
* tests/fixtures/providers: fallback to `test-api-key` if no provider is found
all provider fixtures will:
Use the actual API key if it's set in the environment
Fall back to "test-api-key" if no environment variable is found
Signed-off-by: Teo <teocns@gmail.com>
* set keys for `litellm`
* Improve tests/integration/test_llm_providers.py openai assistants
Signed-off-by: Teo <teocns@gmail.com>
* Make integration tests appropriately skip, regenerate x1 cassette
Signed-off-by: Teo <teocns@gmail.com>
* explicit tests/integration/conftest finxtures import
Signed-off-by: Teo <teocns@gmail.com>
* deps: improve dev packages versionings
* Make integration tests run with python 3.12
Signed-off-by: Teo <teocns@gmail.com>
* add uv.lock
Signed-off-by: Teo <teocns@gmail.com>
* test concurrent api requests: remove matcher on method, possibly causing contingent error
Signed-off-by: Teo <teocns@gmail.com>
* Run static-analysis with python 3.12.2
Signed-off-by: Teo <teocns@gmail.com>
---------
Signed-off-by: Teo <teocns@gmail.com>
Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>1 parent 81c60c6 commit ae0f11b
File tree
41 files changed
+7335
-330
lines changed- .github/workflows
- agentops/llms/providers
- tests
- fixtures
- recordings
- integration
- unit
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
41 files changed
+7335
-330
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
4 | 17 | | |
5 | 18 | | |
6 | 19 | | |
| |||
23 | 36 | | |
24 | 37 | | |
25 | 38 | | |
26 | | - | |
| 39 | + | |
27 | 40 | | |
28 | 41 | | |
29 | 42 | | |
| 43 | + | |
| 44 | + | |
30 | 45 | | |
31 | 46 | | |
32 | 47 | | |
| |||
49 | 64 | | |
50 | 65 | | |
51 | 66 | | |
52 | | - | |
53 | | - | |
| 67 | + | |
| 68 | + | |
54 | 69 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 70 | + | |
60 | 71 | | |
61 | 72 | | |
62 | 73 | | |
| |||
68 | 79 | | |
69 | 80 | | |
70 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
139 | 202 | | |
140 | 203 | | |
141 | 204 | | |
| |||
234 | 297 | | |
235 | 298 | | |
236 | 299 | | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | 300 | | |
300 | 301 | | |
301 | 302 | | |
| |||
309 | 310 | | |
310 | 311 | | |
311 | 312 | | |
312 | | - | |
| 313 | + | |
313 | 314 | | |
314 | 315 | | |
315 | 316 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
46 | 61 | | |
| 62 | + | |
47 | 63 | | |
48 | 64 | | |
49 | 65 | | |
50 | 66 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
58 | 75 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
63 | 79 | | |
64 | 80 | | |
65 | | - | |
66 | | - | |
| 81 | + | |
67 | 82 | | |
| 83 | + | |
| 84 | + | |
68 | 85 | | |
69 | 86 | | |
70 | 87 | | |
| |||
89 | 106 | | |
90 | 107 | | |
91 | 108 | | |
92 | | - | |
| 109 | + | |
93 | 110 | | |
94 | 111 | | |
95 | 112 | | |
96 | 113 | | |
97 | 114 | | |
98 | 115 | | |
99 | 116 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
105 | 120 | | |
106 | 121 | | |
107 | 122 | | |
| |||
Whitespace-only changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
0 commit comments