11import asyncio
22
33import pytest
4+ from packaging import version
45
56from arangoasync .exceptions import (
67 DocumentDeleteError ,
@@ -306,7 +307,7 @@ async def test_document_find(doc_col, bad_col, docs):
306307
307308
308309@pytest .mark .asyncio
309- async def test_document_insert_many (doc_col , bad_col , docs ):
310+ async def test_document_insert_many (cluster , db_version , doc_col , bad_col , docs ):
310311 # Check errors
311312 with pytest .raises (DocumentInsertError ):
312313 await bad_col .insert_many (docs )
@@ -328,6 +329,9 @@ async def test_document_insert_many(doc_col, bad_col, docs):
328329 assert "error" in res
329330
330331 # Silent mode
332+ if cluster and db_version < version .parse ("3.12.0" ):
333+ pytest .skip ("Skipping silent option" )
334+
331335 result = await doc_col .insert_many (docs , silent = True )
332336 assert len (result ) == len (docs )
333337 for res in result :
@@ -338,7 +342,7 @@ async def test_document_insert_many(doc_col, bad_col, docs):
338342
339343
340344@pytest .mark .asyncio
341- async def test_document_replace_many (doc_col , bad_col , docs ):
345+ async def test_document_replace_many (cluster , db_version , doc_col , bad_col , docs ):
342346 # Check errors
343347 with pytest .raises (DocumentReplaceError ):
344348 await bad_col .replace_many (docs )
@@ -365,6 +369,9 @@ async def test_document_replace_many(doc_col, bad_col, docs):
365369 assert "text" not in doc ["new" ]
366370
367371 # Silent mode
372+ if cluster and db_version < version .parse ("3.12.0" ):
373+ pytest .skip ("Skipping silent option" )
374+
368375 result = await doc_col .replace_many (docs , silent = True )
369376 assert len (result ) == 0
370377 await doc_col .truncate ()
@@ -375,7 +382,7 @@ async def test_document_replace_many(doc_col, bad_col, docs):
375382
376383
377384@pytest .mark .asyncio
378- async def test_document_update_many (doc_col , bad_col , docs ):
385+ async def test_document_update_many (db_version , cluster , doc_col , bad_col , docs ):
379386 # Check errors
380387 with pytest .raises (DocumentUpdateError ):
381388 await bad_col .update_many (docs )
@@ -402,6 +409,9 @@ async def test_document_update_many(doc_col, bad_col, docs):
402409 assert "text" in doc ["new" ]
403410
404411 # Silent mode
412+ if cluster and db_version < version .parse ("3.12.0" ):
413+ pytest .skip ("Skipping silent option" )
414+
405415 result = await doc_col .update_many (docs , silent = True )
406416 assert len (result ) == 0
407417 await doc_col .truncate ()
@@ -412,7 +422,7 @@ async def test_document_update_many(doc_col, bad_col, docs):
412422
413423
414424@pytest .mark .asyncio
415- async def test_document_delete_many (doc_col , bad_col , docs ):
425+ async def test_document_delete_many (db_version , cluster , doc_col , bad_col , docs ):
416426 # Check errors
417427 with pytest .raises (DocumentDeleteError ):
418428 await bad_col .delete_many (docs )
@@ -444,6 +454,9 @@ async def test_document_delete_many(doc_col, bad_col, docs):
444454 assert "error" in result [1 ]
445455
446456 # Silent mode
457+ if cluster and db_version < version .parse ("3.12.0" ):
458+ pytest .skip ("Skipping silent option" )
459+
447460 await doc_col .truncate ()
448461 _ = await doc_col .insert_many (docs )
449462 result = await doc_col .delete_many (docs , silent = True )
0 commit comments