@@ -365,9 +365,10 @@ def test_annotate_async(dataset: Dataset):
365365 semseg = SegmentationAnnotation .from_json (TEST_SEGMENTATION_ANNOTATIONS [0 ])
366366 polygon = PolygonAnnotation .from_json (TEST_POLYGON_ANNOTATIONS [0 ])
367367 bbox = BoxAnnotation (** TEST_BOX_ANNOTATIONS [0 ])
368+ category = CategoryAnnotation .from_json (TEST_CATEGORY_ANNOTATIONS [0 ])
368369
369370 job : AsyncJob = dataset .annotate (
370- annotations = [semseg , polygon , bbox ],
371+ annotations = [semseg , polygon , bbox , category ],
371372 asynchronous = True ,
372373 )
373374 job .sleep_until_complete ()
@@ -377,11 +378,11 @@ def test_annotate_async(dataset: Dataset):
377378 "message" : {
378379 "annotation_upload" : {
379380 "epoch" : 1 ,
380- "total" : 2 ,
381+ "total" : 3 ,
381382 "errored" : 0 ,
382383 "ignored" : 0 ,
383384 "datasetId" : dataset .id ,
384- "processed" : 2 ,
385+ "processed" : 3 ,
385386 },
386387 "segmentation_upload" : {
387388 "ignored" : 0 ,
@@ -390,8 +391,8 @@ def test_annotate_async(dataset: Dataset):
390391 },
391392 },
392393 "job_progress" : "1.00" ,
393- "completed_steps" : 3 ,
394- "total_steps" : 3 ,
394+ "completed_steps" : 4 ,
395+ "total_steps" : 4 ,
395396 }
396397
397398
@@ -400,11 +401,12 @@ def test_annotate_async_with_error(dataset: Dataset):
400401 dataset .append (make_dataset_items ())
401402 semseg = SegmentationAnnotation .from_json (TEST_SEGMENTATION_ANNOTATIONS [0 ])
402403 polygon = PolygonAnnotation .from_json (TEST_POLYGON_ANNOTATIONS [0 ])
404+ category = CategoryAnnotation .from_json (TEST_CATEGORY_ANNOTATIONS [0 ])
403405 bbox = BoxAnnotation (** TEST_BOX_ANNOTATIONS [0 ])
404406 bbox .reference_id = "fake_garbage"
405407
406408 job : AsyncJob = dataset .annotate (
407- annotations = [semseg , polygon , bbox ],
409+ annotations = [semseg , polygon , bbox , category ],
408410 asynchronous = True ,
409411 )
410412 job .sleep_until_complete ()
@@ -415,11 +417,11 @@ def test_annotate_async_with_error(dataset: Dataset):
415417 "message" : {
416418 "annotation_upload" : {
417419 "epoch" : 1 ,
418- "total" : 2 ,
420+ "total" : 3 ,
419421 "errored" : 1 ,
420422 "ignored" : 0 ,
421423 "datasetId" : dataset .id ,
422- "processed" : 1 ,
424+ "processed" : 2 ,
423425 },
424426 "segmentation_upload" : {
425427 "ignored" : 0 ,
@@ -428,8 +430,8 @@ def test_annotate_async_with_error(dataset: Dataset):
428430 },
429431 },
430432 "job_progress" : "1.00" ,
431- "completed_steps" : 3 ,
432- "total_steps" : 3 ,
433+ "completed_steps" : 4 ,
434+ "total_steps" : 4 ,
433435 }
434436
435437 assert "Item with id fake_garbage doesn" in str (job .errors ())
0 commit comments