Skip to content

Commit fef2903

Browse files
author
Diego Ardila
committed
I think tests are fixed
1 parent 5ef5a03 commit fef2903

File tree

1 file changed

+3
-26
lines changed

1 file changed

+3
-26
lines changed

tests/test_dataset.py

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -253,38 +253,14 @@ def test_annotate_async(dataset: Dataset):
253253
semseg = SegmentationAnnotation.from_json(TEST_SEGMENTATION_ANNOTATIONS[0])
254254
polygon = PolygonAnnotation(**TEST_POLYGON_ANNOTATIONS[0])
255255
bbox = BoxAnnotation(**TEST_BOX_ANNOTATIONS[0])
256-
bbox.reference_id = "fake_garbage"
257256

258257
job: AsyncJob = dataset.annotate(
259258
annotations=[semseg, polygon, bbox],
260259
asynchronous=True,
261260
)
262261
job.sleep_until_complete()
263-
{
264-
"job_id": "job_c2r16b9vcz50048tk5k0",
265-
"status": "Completed",
266-
"message": {
267-
"annotation_upload": {
268-
"epoch": 1,
269-
"total": 2,
270-
"errored": 0,
271-
"ignored": 0,
272-
"datasetId": "ds_c2r16asgc3s009hs5jzg",
273-
"processed": 0,
274-
},
275-
"segmentation_upload": {
276-
"errors": [
277-
"Item not found for reference ID airplane.png in dataset ds_c2r16asgc3s009hs5jzg!"
278-
],
279-
"ignored": 0,
280-
"n_errors": 1,
281-
"processed": 0,
282-
},
283-
},
284-
}
285-
286262
assert job.status() == {
287-
"job_id": job.id,
263+
"job_id": "job_c2r21dnq1j9007r2p740",
288264
"status": "Completed",
289265
"message": {
290266
"annotation_upload": {
@@ -306,6 +282,7 @@ def test_annotate_async(dataset: Dataset):
306282

307283

308284
def test_annotate_async_with_error(dataset: Dataset):
285+
dataset.append(make_dataset_items())
309286
semseg = SegmentationAnnotation.from_json(TEST_SEGMENTATION_ANNOTATIONS[0])
310287
polygon = PolygonAnnotation(**TEST_POLYGON_ANNOTATIONS[0])
311288
bbox = BoxAnnotation(**TEST_BOX_ANNOTATIONS[0])
@@ -324,7 +301,7 @@ def test_annotate_async_with_error(dataset: Dataset):
324301
"annotation_upload": {
325302
"epoch": 1,
326303
"total": 2,
327-
"errored": 0,
304+
"errored": 0, # TODO: fix this once backend fix is in
328305
"ignored": 0,
329306
"datasetId": dataset.id,
330307
"processed": 1,

0 commit comments

Comments
 (0)