File tree 2 files changed +24
-16
lines changed
2 files changed +24
-16
lines changed Original file line number Diff line number Diff line change @@ -5,4 +5,7 @@ filterwarnings =
5
5
error:^`np\.[a-z]+` is a deprecated alias for.+:DeprecationWarning:mlflow
6
6
error:^`np\.[a-z]+` is a deprecated alias for.+:DeprecationWarning:tests
7
7
error::pytest.PytestCollectionWarning
8
+ # TODO: In pytest 8.4.0 (not released yet), this can be removed.
9
+ # Raise an error if async tests without the `@pytest.mark.asyncio` decorator are found.
10
+ error::pytest.PytestUnhandledCoroutineWarning
8
11
timeout = 1200
Original file line number Diff line number Diff line change @@ -241,22 +241,26 @@ def embeddings_response():
241
241
def embeddings_batch_response ():
242
242
return {
243
243
"embeddings" : [
244
- [
245
- 3.25 ,
246
- 0.7685547 ,
247
- 2.65625 ,
248
- - 0.30126953 ,
249
- - 2.3554688 ,
250
- 1.2597656 ,
251
- ],
252
- [
253
- 7.25 ,
254
- 0.7685547 ,
255
- 4.65625 ,
256
- - 0.30126953 ,
257
- - 2.3554688 ,
258
- 8.2597656 ,
259
- ],
244
+ {
245
+ "value" : [
246
+ 3.25 ,
247
+ 0.7685547 ,
248
+ 2.65625 ,
249
+ - 0.30126953 ,
250
+ - 2.3554688 ,
251
+ 1.2597656 ,
252
+ ]
253
+ },
254
+ {
255
+ "value" : [
256
+ 7.25 ,
257
+ 0.7685547 ,
258
+ 4.65625 ,
259
+ - 0.30126953 ,
260
+ - 2.3554688 ,
261
+ 8.2597656 ,
262
+ ]
263
+ },
260
264
],
261
265
"headers" : {"Content-Type" : "application/json" },
262
266
}
@@ -294,6 +298,7 @@ async def test_embeddings(prompt):
294
298
mock_post .assert_called_once ()
295
299
296
300
301
+ @pytest .mark .asyncio
297
302
async def test_embeddings_batch ():
298
303
config = embeddings_config ()
299
304
with mock .patch (
You can’t perform that action at this time.
0 commit comments