@@ -258,61 +258,6 @@ def test_upload_collection_dict_np_arrays(local_client, remote_client):
258258 compare_collections (local_client , remote_client , UPLOAD_NUM_VECTORS )
259259
260260
261- def test_upload_payload_contain_nan_values ():
262- # usual case when payload is extracted from pandas dataframe
263-
264- local_client = init_local ()
265- remote_client = init_remote ()
266-
267- vector_size = 2
268- nans_collection = "nans_collection"
269- local_client .recreate_collection (
270- collection_name = nans_collection ,
271- vectors_config = models .VectorParams (size = vector_size , distance = models .Distance .DOT ),
272- )
273- remote_client .recreate_collection (
274- collection_name = nans_collection ,
275- vectors_config = models .VectorParams (size = vector_size , distance = models .Distance .DOT ),
276- )
277- points = generate_points (
278- num_points = UPLOAD_NUM_VECTORS ,
279- vector_sizes = 2 ,
280- with_payload = False ,
281- )
282- ids , vectors , payload = [], [], []
283- for i in range (len (points )):
284- points [i ].payload = {"surprise" : math .nan }
285-
286- for point in points :
287- ids .append (point .id )
288- vectors .append (point .vector )
289- payload .append (point .payload )
290-
291- with pytest .raises (ValueError ):
292- local_client .upload_collection (nans_collection , vectors , payload )
293- with pytest .raises (qdrant_client .http .exceptions .UnexpectedResponse ):
294- remote_client .upload_collection (nans_collection , vectors , payload )
295-
296- with pytest .raises (ValueError ):
297- local_client .upload_points (nans_collection , points )
298- with pytest .raises (qdrant_client .http .exceptions .UnexpectedResponse ):
299- remote_client .upload_points (nans_collection , points )
300-
301- points_batch = models .Batch (
302- ids = ids ,
303- vectors = vectors ,
304- payloads = payload ,
305- )
306-
307- with pytest .raises (ValueError ):
308- local_client .upsert (nans_collection , points = points_batch )
309- with pytest .raises (qdrant_client .http .exceptions .UnexpectedResponse ):
310- remote_client .upsert (nans_collection , points = points_batch )
311-
312- local_client .delete_collection (nans_collection )
313- remote_client .delete_collection (nans_collection )
314-
315-
316261def test_upload_wrong_vectors ():
317262 local_client = init_local ()
318263 remote_client = init_remote ()
0 commit comments