Skip to content

Commit 94c836f

Browse files
committed
fix broken ignore tests
1 parent cbbd882 commit 94c836f

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

tests/test_annotation.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,9 @@ def test_box_gt_upload_update(dataset):
209209

210210
def test_box_gt_upload_ignore(dataset):
211211
annotation = BoxAnnotation(**TEST_BOX_ANNOTATIONS[0])
212+
213+
print(annotation)
214+
212215
response = dataset.annotate(annotations=[annotation])
213216

214217
assert response["annotations_processed"] == 1
@@ -222,10 +225,12 @@ def test_box_gt_upload_ignore(dataset):
222225
"reference_id"
223226
]
224227
annotation_update = BoxAnnotation(**annotation_update_params)
228+
225229
# Default behavior is ignore.
226230
response = dataset.annotate(annotations=[annotation_update])
227231

228-
assert response["annotations_processed"] == 1
232+
233+
assert response["annotations_processed"] == 0
229234
assert response["annotations_ignored"] == 1
230235

231236
response = dataset.refloc(annotation.reference_id)["annotations"]["box"]
@@ -286,7 +291,7 @@ def test_polygon_gt_upload_ignore(dataset):
286291
# Default behavior is ignore.
287292
response = dataset.annotate(annotations=[annotation_update])
288293

289-
assert response["annotations_processed"] == 1
294+
assert response["annotations_processed"] == 0
290295
assert response["annotations_ignored"] == 1
291296

292297
response = dataset.refloc(annotation.reference_id)["annotations"][

tests/test_prediction.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def test_box_pred_upload_ignore(model_run):
175175
# Default behavior is ignore.
176176
response = model_run.predict(annotations=[prediction_update])
177177

178-
assert response["predictions_processed"] == 1
178+
assert response["predictions_processed"] == 0
179179
assert response["predictions_ignored"] == 1
180180

181181
response = model_run.refloc(prediction.reference_id)["box"]
@@ -230,7 +230,7 @@ def test_polygon_pred_upload_ignore(model_run):
230230
# Default behavior is ignore.
231231
response = model_run.predict(annotations=[prediction_update])
232232

233-
assert response["predictions_processed"] == 1
233+
assert response["predictions_processed"] == 0
234234
assert response["predictions_ignored"] == 1
235235

236236
response = model_run.refloc(prediction.reference_id)["polygon"]

0 commit comments

Comments
 (0)